![]() The library just contains this single function: To correctly simulate this scenario, we are going to create a library with different toolchains and see what happens when we link them to an Unreal Engine project. In fact, there’s no guarantee that binaries generated with a different toolchain are ABI compatible with the binaries produced by our toolchain even if the architecture matches. It’s of extreme importance to know the compiler used, the C++ standard, the standard library used and, of course, the target architecture. ![]() When a third-party library comes as a pre-built binary, we need to carefully look at all the details available regarding the compilation toolchain used. Thus, we can think about Unreal as the environment we use for simulating the scenarios presented above in a complex (and thus realistic) setting.Īs previously introduced, every OS has its peculiarities when it comes to the integration of a third-party library - this article will focus on Linux. On Linux, it uses libc++ instead of libstdc++ and this can cause lots of trouble when working with third-party libraries.Depending on the OS, the compilation toolchain to use is different (sometimes is fixed and Unreal provides it, some other times it uses the OS toolchain).It uses a non-standard build tool (UBT).Unreal Engine comes into play because it is a C++ cross-platform framework that adds some additional layers of complexity: There will be a second article that we’ll focus on the source code available scenario. The focus of this article will be - in fact - on the packaging problems that are very likely to occur when integrating a third-party library into a C++ project and how - when possible! - to solve them. There’s also a third scenario, that’s when the library is header-only, but the integration is very easy and there are no packaging problems (more or less…). The third-party library source code is available and we have to compile it.The third-party library comes as a pre-built binary. ![]() Every Operating System (OS) has its own peculiarities when it comes to integrating third-party software, but apart from the OS, there are only 2 possible scenarios when it comes to the integration of a third-party library in a C++ software: The Unreal Build Tool (UBT) official documentation explains how to integrate a third-party library into Unreal Engine projects in a very broad way without focusing on the real problems that are (very) likely to occur while integrating the library. Integrating third-party libraries as Unreal Engine plugins: ABI compatibility and Linux toolchain May 27, 2022
0 Comments
Leave a Reply. |