Still having trouble getting my first SDL program to compile- but thanks for your help so far. I am using the sdl-devel rpm. Here is the exact command I’m using to compile:
gcc SDLtest.c sdl-config --cflags --libs
here’s the error message (I edited the length down. It’s a long listing of undefined references, it looks like all are from /usr/lib/libSDL.a…):
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x1d): In function X11_Available': : undefined reference to
XOpenDisplay’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x2f): In function X11_Available': : undefined reference to
XCloseDisplay’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x453): In function create_aux_windows': : undefined reference to
XDestroyWindow’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x4ff): In function create_aux_windows': : undefined reference to
XCreateWindow’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x528): In function create_aux_windows': : undefined reference to
XSelectInput’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x583): In function create_aux_windows': : undefined reference to
XInternAtom’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x5da): In function create_aux_windows': : undefined reference to
XSendEvent’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x5ff): In function create_aux_windows': : undefined reference to
XGetWMHints’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x61b): In function create_aux_windows': : undefined reference to
XGetWMName’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x638): In function create_aux_windows': : undefined reference to
XGetWMIconName’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x64e): In function create_aux_windows': : undefined reference to
XDestroyWindow’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x6a0): In function create_aux_windows': : undefined reference to
XCreateWindow’
/usr/lib/libSDL.a(SDL_x11video.lo)(.text+0x6b7): In function `create_aux_windows’:
…
collect2: ld returned 1 exit status
I ran rpm -qa | grep “SDL” and here’s what I got:
SDL-1.2.5-3
SDL_net-devel-1.2.4-5
SDL_image-devel-1.2.2-5
SDL_image-1.2.2-5
SDL_mixer-1.2.4-7
SDL-devel-1.2.6-1
SDL_net-1.2.4-5
SDL_mixer-devel-1.2.4-7
sdl-config --cflags --libs give me:
-I/usr/include/SDL -D_REENTRANT
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread—
I’m having trouble getting my first SDL program to compile. I used the devel RPM, and it says that this installed fine. I’m not able to gcc a program though. I’m using sdl-config --cflags --libs
as a parameter for gcc.
which sdl-config gives me /usr/bin/sdl-config
sdl-config --version is 1.2.6
locate libSDL gives me this:
/usr/lib/libSDL-1.2.so.0
/usr/lib/libSDL_mixer-1.2.so.0
/usr/lib/libSDL-1.2.so.0.0.5
/usr/lib/libSDL_mixer-1.2.so.0.2.2
/usr/lib/libSDL_net-1.2.so.0
/usr/lib/libSDL_net-1.2.so.0.0.4
/usr/lib/libSDL_image-1.2.so.0
/usr/lib/libSDLmain.a
/usr/lib/libSDL_image-1.2.so.0.1.1
/usr/lib/libSDL_mixer.a
/usr/lib/libSDL_mixer.la
/usr/lib/libSDL_mixer.so
/usr/lib/libSDL_net.a
/usr/lib/libSDL_net.so
/usr/lib/libSDL.a
/usr/lib/libSDL.la
I don’t have a config.log file. (But rpm does say that sdl is installed. I checked by running rpm -qa)
I’m very new to linux, so it may be something very simple I’m missing. Can anyone see what it is? -John
Do you Yahoo!?
Yahoo! Hotjobs: Enter the “Signing Bonus” Sweepstakes