Hi, first of all.. THANK YOU for putting this together as well as the "RCC++ for Rapid AI Development" article in GAME AI PRO. Ironically, I have an article in that book too =)
Also, I admit I'm new to all this and feel I'm missing something basic here. I'm hopeful you'll be able to figure out my issue quickly, apologies for the lengthy description.
Ok, I've added RCC++ into an existing game engine. I was able to get a new / simple test class to recompile correctly based on looking at ConsoleExample and SimpleTest. Man it's so awesome to see that working! However after setting up an existing 'code heavy' game object class, when it recompiles I get a lot of unresolved symbol errors with 'same project' math and game play code.
here is an example error:
entity.obj : error LNK2019: unresolved external symbol "public: static float __cdecl Math::random(void)" (?random@Math@@SAMXZ) referenced in function ...
It's as if the existing 'same project' .obj files are not being used when recompiling the entity class.
Here's a description of the work I've done:
Game Objects are constructed similar to SimpleTest. I made sure to derive from TInterface<IID_blah, IObject> and have RUNTIME_COMPILER_LINKLIBRARY and REGISTERCLASS(blah) in the .cpp as well as RUNTIME_MODIFIABLE_INCLUDE in the header (if its a registered class).
I made sure m_RuntimeLinkLibraryMap, m_RuntimeIncludeMap, m_RuntimeFileList look similar to SimpleTest. Of note m_RuntimeSourceDependencyMap is empty, just like SimpleTest. Should it not be?
In an attempt to fix this issue I tried manually calling PerModuleInterface::GetInstance()->AddRequiredSourceFiles("...\\src\\common\\util\\math.cpp"); and that fixes the unresolved symbol errors for the math functions. However I feel it's a hack and not something I should have to do because the examples don't do this and they work just fine.
It feels like I'm missing something basic here, like pointing the code to the right place to find existing .obj files or something.
I assume the linker can use the existing math.obj already built for the .exe.
RCC++ doesn't have to recompile existing 'same project' code that hasn't actually changed right? Obviously, I need to research RCC++ more, because i should know the answer to that question. =)
Ok, so does anyone have an idea what might be causing these unresolved symbol errors?
Thanks for your help... man oh man I can't wait to get this up and running!
Cheers,
Elijah