SFML community forums
Help => General => Topic started by: easy on September 19, 2011, 11:29:55 am
-
The title sums it up. I've tried to link SFML2 statically, but there are errors.
I've compiled the static libraries, they're at "/usr/local/lib/", the includes are at "/usr/local/include/SFML", the project settings are configured to use "/usr/local/lib/libsfml-audio-s.a; /usr/local/lib/libsfml-graphics-s.a; /usr/local/lib/libsfml-window-s.a; /usr/local/lib/libsfml-system-s.a", and I've even added "SFML-STATIC" flag to #defines.
I'm using Code::Blocks, on Linux Mint Debian.
Build log: https://legacy.sfmluploads.org/code/104
Bild messages: https://legacy.sfmluploads.org/code/105
What am I missing?
-
Static libraries are just archives of object files, there's no link step. So you have to link to the external dependencies of SFML in the final executable that uses SFML.
But... don't use static libraries on Linux, it doesn't make sense.
-
So you have to link to the external dependencies of SFML in the final executable that uses SFML.
That sounds really bad...!
But... don't use static libraries on Linux, it doesn't make sense.
Ok then I guess it's enough to copy to shared libraries to the root folder of the game, and to compile to use those ones...
-
Just copy the shared libraries and use LD_LIBRARY_PATH if you really need to go that route.