SFML community forums

Help => General => Topic started by: paupav on September 04, 2014, 02:42:22 am

Title: Statically linking SFML
Post by: paupav on September 04, 2014, 02:42:22 am
Am I allowed to statically link SFML or can I only dynamically link it?
Title: Re: Statically linking SFML
Post by: Rosme on September 04, 2014, 06:43:20 am
Is it too hard to read the license (http://sfml-dev.org/license.php)?
Title: Re: Statically linking SFML
Post by: FRex on September 04, 2014, 07:51:22 am
No, zlib, MIT, BSD and similar are not hard to read but LGPL (and GPL that it requires you to read) are - they are long and are in very formal, legal language.

You can link everything (SFML + all libraries it needs) statically EXCEPT FOR LIBSNDFILE and OPENAL which are under LGPL license and must be linked dynamically. If you link LIBSNDFILE and/or OPENAL statically you must comply with LGPL or GPL (it's your choice which) terms and libraries you use must be compatible with it (SFML and its' libraries are).
Title: Re: Statically linking SFML
Post by: Laurent on September 04, 2014, 10:56:47 am
In case it's not clear, because of the LGPL license of libsndfile and OpenAL on Windows, SFML is compiled against their shared version. So you don't have to do anything to link them dynamically, it's the default. Linking them statically would require a lot of work: compiling/finding static binaries for these libs, and recompiling SFML, possibly adjusting some compiler flags if needed.