[SDL] Statically Link the SDL library

Tim Preager tpreager at ati.com
Tue Dec 23 15:09:00 PST 2003


I'm have an object file that I'm creating which is going to be used as a
plugin for another application.  The object file that I'm creating uses some
SDL functions and I would like to link it statically.  Before I was linking
dynamically by the use of dlopen() and dlsym().  I have added the following
to lines to my homegrown makefile

SDL_CFLAGS := $(shell sdl-config --cflags)
SDL_LDFLAGS := $(shell sdl-config --libs)

here is the output of those two commands:

sdl-config --cflags : -I/usr/include/SDL -D_REENTRANT
sdl-config --libs    : -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread

I'm running RH, kernel 2.4.7-10.  I installed SDL from the .rpm.

It seems that my library file is not much bigger after I added these two
lines.  I thought it would be significantly bigger since I'm now including
the SDL functions in my library.  Is there something that I'm missing?

Regrads,
Tim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031223/9e820de0/attachment.htm>


More information about the SDL mailing list