I’m attempting to integrate my own engine’s static libraries with UE4 in order to facilitate doing a 3D remake of a game I’ve already made. To do this, I built a project with three modules - Engine, which houses my engine, EngineEditor, which will eventually house editor support code, and GameTest, which is where my game code will live.
Initially things went extremely well - integrating my engine into the Engine module worked spectacularly well and I’ve gotten a good chunk of it operational quickly! But as I started moving onto the other modules to actually build some game code to test it, I encountered many weird issues that I couldn’t quite explain at first. Calling my engine code from each of the different modules produced different results as though they were separate implementations.
After several days of poking at it, I am 99% sure that my project is duplicating my static libraries in each of the three modules. I used nm to check the symbols being exported by each of my dylibs (this is on a Mac) and I’ve found that each module contains the full set of exported symbols from my libraries. In order to make absolutely sure that that was unexpected behavior, I also implemented a test function in one of the modules and called it from each of the other modules. It behaved as expected, and its symbols only appeared in the module in which it was written.
I’m including my library in the Engine module via Engine.build.cs using PublicAdditionalLibraries. Is it possible that I need to be using some private equivalent that I don’t know about? Is there a way to see verbose output from the compiler and linker so I can see how they’re being invoked?