Wednesday, April 06, 2005

SDL linking woes

I have tried to compile a small sdl demo and all i get is grief of this
flavor:
checking for SDL - version >= 1.2.0... no

after some research i found that what is happening
is that a small program is trying to compiled and failing.
the analogue is this.

---------------------- sdltest.c -----------------------------------------
#include <SDL.h>
int main(int argc,char **)
{
return 0;
}
----------------------------------------------------------------------------
the configure script uses a configure script sdl-config
to determine to kick out the need library and header
path information.
all of this fails and you get the error:
checking for SDL - version >= 1.2.0... no

if found via google that details what i did above and then
hacked the sdl-config macro. and i was able to compile
the the above test and the testdrivers in the sdl
source distro.

gcc -o sdltest sdltest.c -L/usr/X11R6/lib/ `sdl-config --cflags` `sdl-config --libs` -lX11 -lXext -lgcc

what now insterests me is why i need to add -L/usr/X11/lib?
no actuall i know that i need this but what does the configure
script know this?

No comments: