Using existing third-party code in Unreal Engine
I'm having a code project which I want to integrate into UE. I tried the initial method: build my project as static library (.lib) and use the build script to add the header files and built library, but this method doesn't work (if you want more details I can share my folder directory and my build script, but this is not my favorite way).
My question is, can I use my existing code (both header files and source files, without the need to compile it statically) inside Unreal? If I can, how should I modify the build system?
The reason behind my desire to use code rather than binary form is that I want to have it running with my Linux machine.
Thanks in advance,
asked Oct 11 '16 at 12:57 PM in C++ Programming
Tống Tùng Giang
I would suggest you focus on solving the original problem rather than importing code.
Your approach of importing the libs should work. We do it all the time. The lib needs to be built as static with Multithreaded DLL Release Runtime ( /MD in MSVC14). It must contain all external symbols unless you link further libs (like Boost for example)
And you MUST insulate your interface for including in Unreal which is the hardest part.
Other than that, this here: https://wiki.unrealengine.com/Linking_Static_Libraries_Using_The_Build_System should be accurate enough.
answered Oct 24 '16 at 01:34 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here