2 ms·
I agree, for their use case they should have linked to SDL2 as a static library. It was the best option instead of patching the binary with patchelf. I think m
by frankohn 5y ago
I agree, for their use case they should have linked to SDL2 as a static library. It was the best option instead of patching the binary with patchelf.
I think many developers don't know about static libraries. For some reason they think they have to use a shared libraries. This is probably due to many tutorial saying something like: download the SDL2 library from there, it is provided as a shared library, here the instructions to use it with Visual Studio.
The way I do is with static libraries, I ship a single executable, all the third-party libraries are linked in as static libraries. The only dynamic libraries the exectuable will use are the standard libraries that are part of the OS.
I do this very easily with the help for lhelper:
https://github.com/franko/lhelper https://github.com/franko/lhelper (I am the author)
that has recipes to build many libraries including SDL2. It builds the library on you system using your compiler and your settings. By default it will build static libraries so you don't have to bother distributing additional dynamic libraries.