No DLL in SDL

Started by
5 comments, last by Atrix256 13 years, 8 months ago
Is it possible to compile a SDL game without it's DLL? How?
Advertisement
It would be possible if you compiled it yourself as a static library. However, as SDL seems to be licensed under the LGPL, distributing a program linking statically to SDL would be a violation of the license as you need to offer the possibility to use another (newer) version of SDL with your program.
Quote:Original post by BitMaster
It would be possible if you compiled it yourself as a static library. However, as SDL seems to be licensed under the LGPL, distributing a program linking statically to SDL would be a violation of the license as you need to offer the possibility to use another (newer) version of SDL with your program.


This seems to be the general consensus, but after reading the license I came to the conclusion you may statically link the _official_ unmodified SDL sources, as those source are ready for download at SDL's site. In case of modified sources, you must also publish the SDL sources and you modifications in it.

I bet I'm wrong with the above unfortunately, as so many people state what BitMaster said...
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
Quote:by Wikipedia on LGPL
Essentially, if it is a "work that uses the library", then it must be possible for the software to be linked with a newer version of the LGPL-covered program. The most commonly used method for doing so is to use "a suitable shared library mechanism for linking". Alternatively, a statically linked library is allowed if either source code or linkable object files are provided.


There are certainly higher authorities around than Wikipedia but since this pretty much covers everything I have read in the past on that issue, I'll leave uncovering dissenting opinions to others.
Quote:Original post by Decrius
Quote:Original post by BitMaster
It would be possible if you compiled it yourself as a static library. However, as SDL seems to be licensed under the LGPL, distributing a program linking statically to SDL would be a violation of the license as you need to offer the possibility to use another (newer) version of SDL with your program.


This seems to be the general consensus, but after reading the license I came to the conclusion you may statically link the _official_ unmodified SDL sources, as those source are ready for download at SDL's site. In case of modified sources, you must also publish the SDL sources and you modifications in it.

I bet I'm wrong with the above unfortunately, as so many people state what BitMaster said...


The end user must be able to modify/update the LGPL parts, static linking is fine if you release linkable object files or sourcecode (so that the user can rebuild everything with a modified SDL library) but it is really way too much hassle compared to using dynamic linking.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Quote:Original post by SimonForsman
The end user must be able to modify/update the LGPL parts, static linking is fine if you release linkable object files or sourcecode (so that the user can rebuild everything with a modified SDL library) but it is really way too much hassle compared to using dynamic linking.


Yes, that's what I remember too. But if you _don't_ modify the SDL sources, it means they can just grab it from the internet and adding the sources would be redundant...
[size="2"]SignatureShuffle: [size="2"]Random signature images on fora
You might not modify the SDL sources, but by the GPL, the end user needs to be able to modify the GPL'd code that resides in your program.

Because of this, you need to provide YOUR source code so they can recompile with the modified GPL code, or you need to dynamically link so they can create new DLL's and drop them in.

Basically, the GPL part of your game (SDL) needs to be modifiable by the user one way or another.

Dynamically linking is the commonest way to fulfill this because you don't need to give out your source.

hope that helps clear it up...

[Edited by - Atrix256 on August 24, 2010 5:22:09 PM]

This topic is closed to new replies.

Advertisement