Static Library
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
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.
Also, most people playing games in Linux will certainly have libSDL installed.
By the way, I'm not a Linux user, but a Mac OS X user.
Thanks for your tip anyways.
Thanks for your tip anyways.
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.
It would be easier and better though to just place a sdl .so file in the program directory, though.
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?
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?
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 .
- 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 .
Quote: What's a .so file?Shared library. On MacOS they're .dylib.
I recommend you just bundle the SDL framework with your game. Otherwise, have a look at this guide for creating private frameworks.
Free Mac Mini (I know, I'm a tool)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement