2013/8/7 riptor
**
Currently if you want to link SDL2 as static library you must also link
it’s dependencies which are listed in sdl2-config --static-libs output. Is
it possible to build SDL2 with dependencies already included, so that
linking with SDL2 and maybe SDL2main would be enough?
You can link SDL2 (and SDL2_image, etc) almost entirely statically. On
Linux, you have to link to libpthread, libdl and libc and dynamically
though, no way around it. Also, SDL2 by default will load OpenGL/X11
dynamically via dlopen (it will not even be listed with ldd), so you have
that dynamic dependency as well. So, while making a big static binary blob
has some advantages from a distribution point of view, there’s a bunch of
limitations that prevent you from fully accomplishing this.–
Gabriel.