[SDL] static binaries with sdl

Christopher Thielen chris at luethy.net
Tue Mar 19 19:12:00 PST 2002


A few days ago I figured this out while browsing 'Programming Linux
Games'. I'm still somewhat new to gcc and didn't know that the linker
needs all required libs to come after the lib that requires it, so,
sdl_ttf and sdl_image before sdl, as well as freetype after sdl_ttf, and
so on. i got it to statically build, but my only problem now is that
building a static binary w/ gcc3 ... it seems to make a dynamic link to
a gcc3 lib that doesn't have a static vers ... so, if anybody knows how
to get rid of that dependency when building static w/ gcc3, lemme know,
but until i figure that out, i'll use gcc2.

On Sun, 2002-03-17 at 10:11, Corey Carter wrote:
> 
> ----- Original Message ----- 
> Sent: Sunday, March 10, 2002 12:12 AM
> Subject: Re: [SDL] static binaries with sdl
> 
> 
> > Christopher Thielen wrote:
> > 
> > > i have a gaming project i'm working on and i'd like to make binary
> > > releases for linux, as well as source code releases.
> > > 
> > > i'm not really too sure how to go about doing a binary release, but i
> > > know it involves linking a lot of static libraries into your code.
> > > 
> > > could somebody help me? i'd like to produce a static binary that
> > > utilizes SDL 1.2.3, SDL_ttf (latest version) and SDL_image (latest
> > > version).
> > > 
> > > how do i go about doing that? what's the gcc command line? (sdl,
> > > sdl_image, and sdl_ttf was installing the prefix /usr/local)
> > > 
> > > thanks for any help you guys can offer.
> > > 
> > 
> > gcc -static ...blah
> > 
> > that simple enough for linking?
> 
> You want a static lib that is link to SDL and other SDL base lib's ???
> 
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
> 
-- 
- Chris
Epiar Administrator/Programmer
http://epiar.sourceforge.net/





More information about the SDL mailing list