compile static

feketga x@aigrene.sh.klte.hu
Wed Feb 20 07:25:00 GMT 2002


> >
> Try
> gcc -static `sdl-config --static-libs --cflags` \
> 	/usr/lib/libSDL.a hilbert.c -o hilbert
>

it doesn't work!

/tmp/ccR4BrW7.o(.text+0x3a): undefined reference to `SDL_LockSurface'
/tmp/ccR4BrW7.o(.text+0x9d): undefined reference to `SDL_UnlockSurface'
/tmp/ccR4BrW7.o(.text+0xba): undefined reference to `SDL_UpdateRect'
etc...

:(
I really dont know what to do!

Another question:

How can I make my program to use the libSDL-1.2 (or any other shared
library) from the current directory.
Can I tell this to gcc at compile time?

For example: if the target machine had no libSDL installed I could use
this method to run the program using the lib that I provide with it.
I have no permission to write /usr/lib and /etc/ld.so.conf

thanks!




More information about the Gcc-help mailing list