compile static
feketga
x@aigrene.sh.klte.hu
Tue Feb 19 15:39:00 GMT 2002
Hi!
I want to compile a C program which uses libSDL as not to use
libSDL calls (want to make it static).
I tried this :
gcc `sdl-config --static-libs --cflags` /usr/lib/libSDL.so \
/usr/lib/libSDL.a hilbert.c -o hilbert
it compiles without any error
but it doesn't work as I suggest.
`ldd ./hilbert` shows that it still uses libSDL
`sdl-config --static-libs --cflags` evaluates to :
-L/usr/lib -lSDL -lpthread -lm -L/usr/X11R6/lib -lX11 -lXext -ldl
-L/usr/X11R6/lib -lXxf86dga -lXxf86vm -lXv
-I/usr/include/SDL -D_REENTRANT
Please help!
I have to take the binary executable onto a nother machine which may not
have SDL installed.
More information about the Gcc-help
mailing list