Linking external libraries build with own toolchain

Hi,
Unreal Engine provides own toolchain to build Game on Linux. As long as Game pure code is not a problem.
Now I have to use an external pre-compiled libraries and get various linking errors. It is not a case if I link the same libraries to some test program using PC host toolchain ().
The question is - does anyone build Game with another as by UE5 toolchain? Or it is wrong idea from the beginning and better write a “C” wrapper (what could be quite big) ?

Hello @UMConti, hope you’re doing well. Please avoid using any toolchain other than the one specified by Unreal for compiling. Each version of the engine is specifically compiled and released with a particular toolchain and version to ensure functionality and avoid potential issues. (Unreal already includes third-party libraries like SSL compiled for Linux. If you change the toolchain, you’ll need to recompile all those third-party libraries that come with the engine).

Additionally, keep in mind that compiling for other platforms involves cross-compiling (compiling for Linux from a Windows) which adds complexity.

What libraries are you using? If they’re open-source, I recommend cross-compiling them using the same toolchain Unreal utilizes to package the project.

For Linux, you’ll need to use the designated toolchain (Clang) to compile your libraries. This ensures you won’t encounter any linking problems.
https://dev.epicgames.com/documentation/en-us/unreal-engine/linux-development-requirements-for-unreal-engine?application_version=5.1

Another important thing to keep in mind is that if your third-party libraries depend on other libraries like SSL, you might run into potential linking issues. This is because Unreal Engine already includes an SSL library. In such cases, you’ll need to link your libraries to the same SSL version the engine is using to avoid conflicts.

It might seem like a lot at first, but if you take the time, it’s not a difficult process. If you’ve never done this before, I recommend starting with a simple library. Create a basic function in C++ (like an Add function), and try cross-compiling that to get familiar with the process. Once you’re comfortable, you can move on to cross-compiling the actual library.

Hi @BRGDemianLopez, thank you for the reply. It confirmed also my opinion to push adapter.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.