-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Log: ObjectFactorySystem::AddConstructors() called with no constructors #122
Comments
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 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. |
Thanks for the suggestion. I'll try to implement that. 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? |
Have you first tried compiling the full example: If this works then check for differences in logic or build (cmake) settings. My initial thought is that you don't have |
HI. I have been following the tutorial and GLFW/ImGui example files to integrate RCC++ into my game engine (ImGui, GLFW). Everything is linked using CMake and it compiles.
I keep getting this Log:
ObjectFactorySystem::AddConstructors() called with no constructors
in the console. Following this, theIObjectConstructor*
array constructors in ObjectFactorySystem is empty and I couldn't understand how and where to populate it.Also I went through the ConsoleExample and the ConsoleGame.cpp has
IObjectConstructor* pCtor = m_pRuntimeObjectSystem->GetObjectFactorySystem()->GetConstructor( "RuntimeObject01" );
which I assumed had something to do with the error but it didn't help either.Please help me out as this has become really confusing for me.
What I am trying to achieve is to add a run time scripting system where the user creates a script from the engine and codes into it, and it compiles real-time. I need to add the source files to the compile stream and have changes reflected in the engine according to the code because the script cannot be a part of the project as they don't exist before.
Any advice on this would be appreciated as well.
The text was updated successfully, but these errors were encountered: