This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compile static


> >
> 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!



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]