🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

SDL or Allegro?

Started by
17 comments, last by owl 19 years, 11 months ago
As far as I know, there's no open source license actually preventing you from statically linking. Depending on the license, you will have to make your entire game open source.

BTW, I'm using SDL. I haven't taken a serious look at Allergo yet, so I can't really compare. I do know that there are several big companies using SDL for games (UT2003/4 use it for their linux port).
Advertisement
Quote: Original post by owl
Is it allowed (in the licence) to statically link allegro to one's project?

What Gyrbo said. Allegro's license is essentially non-existant; it's pure giftware. You can do anything you want with it.

Jesus saves ... the rest of you take 2d4 fire damage.

Quote: Original post by 23yrold3yrold
Quote: Original post by owl
Is it allowed (in the licence) to statically link allegro to one's project?

What Gyrbo said. Allegro's license is essentially non-existant; it's pure giftware. You can do anything you want with it.


Good, that's what I tought. That would be a reason for me to choose allegro over SDL. The SDL licence doesn't let you link the library statically, they say this is to allow users to be able to upgrade it.
[size="2"]I like the Walrus best.
It's at least partly a good thing that they disallow static linking. For example, I just recently noticed that there was a problem with joystick handling on Linux systems in SDL 1.2.7. I'm now running the latest CVS version and it works great. Now if there were any statically linked games that I wanted to play, the joystick would still not work.
Yes it's true. On the other hand, some people (without knowledge) having that version of SDL would experience the problem with the joystic and while they don't upgrade the library they won't be able to correct the problem.

I personally think that games should come fully tested and that they should provide the apropiate (working) libraries so the user only has to worry about installing and playing the game.

By the way, I noticed UT2004 for linux comes libSDL[etc].so in the game's bin directory and sticks to it instead of the one in /usr/lib. (I removed the one in /usr/lib and the game still worked, and when I removed the one in ./ut2004/bin the game said it couldn't find the shared lib)

How do they do to specify the game which shared library to use?

In windows executables look up for them first in the game folder and later in the system directory. But I've no idea how does this work in *nix systems. I think I'm going to post a thread about this in the appropiate forum.
[size="2"]I like the Walrus best.
I'm guessing they're using the linux equilivant(sp?) of the LoadLibrary calls on windows.
Quote: Original post by owl
In windows executables look up for them first in the game folder and later in the system directory. But I've no idea how does this work in *nix systems.


Just like that :)

BTW, the static linking issue is a hot topic on the SDL mailing lists right now. Basically the LGPL licence is incompatible with systems which a) require static linking, and b) have limited storage space so the unlinked library can't be distributed along with the main program. This rules out porting the library to Symbian etc.

I've been using both SDL for a while now and it's great. I shifted away from Allegro because it was getting a bit too hefty, but then I always end up adding the extra stuff that Allegro provides anyway. Maybe I should give it another go.
[teamonkey] [blog] [tinyminions]
Quote: Original post by owl
How do they do to specify the game which shared library to use?


$LD_LIBRARY_PATH in the environment.

EDIT: Fixed link.

[Edited by - 23yrold3yrold on August 12, 2004 4:49:24 PM]
Thank you everyone.

Apparently, as someone said, they have an script (from loky) that adds the game's bin directory to the $LD_LIBRARY_PATH. As the article AP posted above says, I think that setting that enviroment variable before running is a little tricky, specially for those systems that may not use it (if there is any). But, I can't figure out any other solution to move along.

Anyway, for a commercial game targeted to i386 PCs (mostly running linux), that should be good enough.
[size="2"]I like the Walrus best.

This topic is closed to new replies.

Advertisement