Comments (3)
This isn't the intended way of using RCC++, which is designed for changing your own code at runtime. It is possible, but it's an advanced use case.
You need to use m_pRuntimeObjectSystem->AddToRuntimeFileList( filename, projectId );
.
I think you will also need to set off the first compile after adding a file. I would use a different projectId (default is 0) to your main code so you can recompile only that code if needed and set options for that project separately.
Since the file doesn't exist to start with, RCC++ won't have a pre-compiled set of information about the libraries, includes etc. which this file uses. If the user writes their code by first adding the correct library and includes as per RCC++ before writing any code this should work, but you may want to make sure they always include a header which has the correct includes in it to work well.
One issue for using RCC++ this way is that the scripting system will always need to recompile the source code every run, though it you do not delete the temporary files this should be fairly fast.
I am considering adding improved support for scripting with RCC++ at some point, but currently do not have the time.
from runtimecompiledcplusplus.
Thanks for the suggestion. I'll try to implement that.
But before I do that, the problem at hand right now is the program is not able to find RCCppMainloop.cpp as given in step 3 of the tutorial. It keeps on returning ObjectFactorySystem::AddConstructors() called with no constructors
in the console along with Found Directory Maps. I have the file, RCCppMainloop.cpp, in the directory.
RCCppInit()
bool dag::EditorUILayer::RCCppInit()
{
g_SystemTable.pRuntimeObjectSystem = new RuntimeObjectSystem;
g_SystemTable.pLogger = &g_Logger;
if (!g_SystemTable.pRuntimeObjectSystem->Initialise(&g_Logger, &g_SystemTable))
{
delete g_SystemTable.pRuntimeObjectSystem;
g_SystemTable.pRuntimeObjectSystem = NULL;
return false;
}
g_SystemTable.pRuntimeObjectSystem->CleanObjectFiles();
#ifndef _WIN32
g_SystemTable.pRuntimeObjectSystem->SetAdditionalCompileOptions("-std=c++11");
#endif
return true;
}
I have the program compiling and running. What might be causing this?
from runtimecompiledcplusplus.
Have you first tried compiling the full example:
https://github.com/juliettef/RCCpp-DearImGui-GLFW-example
If this works then check for differences in logic or build (cmake) settings.
My initial thought is that you don't have RCCppMainloop.cpp
in your CMakeLists.txt as per:
https://github.com/juliettef/RCCpp-DearImGui-GLFW-example/blob/main/CMakeLists.txt#L51-L52
from runtimecompiledcplusplus.
Related Issues (20)
- VS 2017 'GetObject' is not a member of 'IObjectFactorySystem' HOT 7
- Gallery: projects using RuntimeCompiledCPlusCPlus HOT 2
- Webpage moved HOT 1
- Crash in ObjectFactorySystem.cpp line 250 when no RCC++ objects and no logger
- Visual Studio 2019 debug info issue after first recompile
- Question: Use Case: Self-optimization HOT 6
- Remove need for hierarchy of classes with virtual functions in RuntimeTracking
- RUNTIME_COMPILER_SOURCEDEPENDENCY off-by-1 error HOT 2
- Improve FindFile handling of relative file paths
- Stack Cookie Check Failure error HOT 1
- Dynamic loading of generated code without writing to files HOT 2
- Linking compile output back into project HOT 3
- Question: Modifiable class macro discovery within static libs HOT 8
- Simplify RuntimeCompiledCPlusPlus by loading .dll's in RAM HOT 1
- Games HOT 1
- Runtime Linker issues HOT 7
- Deriving RCCpp Compilation HOT 4
- Runtime Compiled C++ Linker Errors HOT 2
- unresolved external symbols VS2017 RuntimeObjectSystem HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runtimecompiledcplusplus.