I’m trying to compile C++ code (pure C++11, no dependencies) in an UE project, without any luck. I’m struggling to understand how should I tell UE build system where to look for the code.
Basically, I’ve got this sort of library. It’s shared amongst other C++ projects (not related to UE4) and constantly evolving, so I don’t want to create a .lib or stuff like that. I just want to tell UE 4 “look, there are other C++ classes to compile, it’s just that they’re in another directory other than your project directory”. This way when I compile the UE4 project, it also compiles that code too. How do I do that?
I’ve managed let the compiler know of the C++ headers by adding this in the Build.cs file:
In the code, I’m simply creating a random object of a class that belongs to this library, but when I try to compile it throws me “Unresolved external symbols” related to the class methods, meaning it can find the definitions of the methods (in the header), but can’t find their implementation (i.e. the .cpp file). How can I tell the compilere where to look for the .cpp files (which are in the same folder of each corresponding .h)?
Can anyone save me from this nightmare?