Jump to content
  • Advertisement
Sign in to follow this  
TWizard

Static Library

This topic is 4689 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on a game containing SDL, but I don't want it to force the users to install SDL. How am I supposed to do this? I have tried using .a files, but I haven't succeeded. It can never seem to find the files I try to include. Anyone have tips or tutorials? Thanks in advance. TWizard

Share this post


Link to post
Share on other sites
Advertisement
Perhaps it is a better idea to include libSDL.so in your program's directory. All Linux games that I know of do so. If you decide to link statically then do remember that you must license your program under the LGPL.
Also, most people playing games in Linux will certainly have libSDL installed.

Share this post


Link to post
Share on other sites
I find that GCC is very finicky about the order static libs are passed with object files on the command line. If you're getting undefined reference errors, try moving some of the arguments around.

It would be easier and better though to just place a sdl .so file in the program directory, though.

Share this post


Link to post
Share on other sites
if you statically link to SDL then you need to arrange it so
users can recompile your program with a newer version of SDL

basically that boils down to releasing the object code[ not the source, but
you can if you want to ;) ] of your program.

its easier on everyone if you leave it dynamically link...

your game probably uses external media anyway, so its probably going to be in a folder with a bunch of stuff anyways, so why not throw in the .so files too?

Share this post


Link to post
Share on other sites
Thanks for all your advice, but:

- What's a .so file?
- Where can I get one?
- How do I link it with XCode?
- If anyone else knows other ways to do this, which wouldn't involve external files which would have to clutter the application's folder, feel free to either reply here, or, if the thread is dying, you can send me an e-mail at jonathankoff@gmail.com .

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!