As far as I know, as you build SDL_image statically, you’ll need to link those other libs to it. Thus, the static lib will include all the necessary code from those libraries. When you link that static lib into your project, you won’t need anything else.Jonny DDate: Wed, 17 Sep 2008 11:30:10 -0400From: rnodal at gmail.comTo: sdl at lists.libsdl.orgSubject: Re: [SDL] SDL and friends static linking. OTOn Wed, Sep 17, 2008 at 9:15 AM, Gabriele Greco <gabriele.greco at darts.it> wrote:On Wed, Sep 17, 2008 at 2:31 PM, Rogelio Nodal wrote:
That is not what I meant. What I meant is that If I don’t link statically then the user needs to install whatever library my engine depends on and If he/she has not root access then they will not be able to install those libraries or will have to build the library themselves and install it in their home directory. I’m sorry but in terms of playing a game that just seems way to much.
Static link is a bad idea anyway, you’ll end to have all the dependencies of the library you static link to, except if you static link everything, but this is not possible for instance if you want to use accelerated OpenGL.
I suggest you to ship your shared libraries in the game installation path and limit the dependency to libc, libdl, X11, alsa, libGL and nothing else. You can load shared libraries from a custom location setting rpath in the link stage to point to the directory where you place your libraries.
You cannot be sure that the distro has the libraries you need since the distro may be too hold to have the correct version or too new (and have only a newer incompatible version).For a detailed description of deployment problem and solutions look at the developer section of http://autopackage.org
You don’t need to package your game with autopackage, but you can use some very useful autopackage components: binreloc, apgcc On OSX and Win32 it’s simpler cause you can ship your frameworks inside the application bundle (osx) and your support DLL in the binary path (win).
– Ing. Gabriele Greco, DARTS EngineeringTel: +39-0105761240 Fax: +39-0105760224s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
That is what I want to do. I want to reduce the dependency to only those things. That’s why I asked if I build, let’s say, SDL_Image statically, will libpng, libjpge etc get linked into SDL_Image or I still need to link my engine against libpng etc. Since my engine depends on GL, SDL, SDL_Image, SDL_Mixer and want the developer that uses my engine to only having to link against my engine library and not against another 3 or more libraries.
– Rogelio Nodal
See how Windows connects the people, information, and fun that are part of your life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/