This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: compile static
- From: feketga <x at aigrene dot sh dot klte dot hu>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 19 Feb 2002 15:59:01 +0100 (CET)
- Subject: Re: compile static
- Reply-to: Fekete Gabor <feketga at delfin dot klte dot hu>
> >
> 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!