C/C++ >> SDL and gcc
Posted by Peter on 11:16:00 09-20-2001
I would have asked this question in chan but the sysadmins in school have blocked the ports.. Have to get myself a bouncer running somewhere.

So here goes: I want to compile an SDL app but I can't find the parameter to show gcc where the SDL header files are. I need this parameter, so if you know it... plz
Posted by Peter on 12:40:00 09-20-2001
Now I got the devel thing installed and I include "SDL/SDL.h". Tada, it is found.

BUT! Now it tells me "undefined reference to 'x'" where x = (any SDL function). OMG!!!!
Posted by fsvara on 16:43:00 09-20-2001
hm, how about compiling with "-lsdl"? I guess that will make it work...
Posted by Peter on 07:21:00 09-21-2001
thx svara, but

[peter@localhost sdl]$ gcc -lSDL sdl.c -o sdl
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libSDL.so: undefined reference
to `pthread_create'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libSDL.so: undefined reference
to `pthread_cancel'

etc.

did I do that?
Posted by robost86 on 11:49:00 09-21-2001
-lpthread ?
Posted by Peter on 22:03:00 09-29-2001
Thanks! Now it works smoothly! Now I can learn SDL .

I do have one more SDL question for you guys: how do I make a window persist? (e.g. not close directly after initialization)