This must be a dead-simple thing but I didn’t find a cure on the SDL
website.
I started trying SDL and made a little ‘Alive.cpp’ app. Works fine on Win32
(Visual C++ 6.0).
When trying to compile the same on Linux, I get a lot of X11 compilation
errors.
Here’s the compile command:
gcc -o out/alive Alive.cpp sdl-config --cflags --libs
Which translates into:
gcc -o out/alive Alive.cpp -I/usr/include/SDL -D_REENTRANT
-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread
And here’s the output (beginning of it):
/usr/lib/libSDL.a(SDL_x11video.lo): In function X11_Available': SDL_x11video.lo(.text+0x1d): undefined reference to
XOpenDisplay’
SDL_x11video.lo(.text+0x2f): undefined reference to XCloseDisplay' /usr/lib/libSDL.a(SDL_x11video.lo): In function
create_aux_windows’:
SDL_x11video.lo(.text+0x453): undefined reference to
XDestroyWindow' SDL_x11video.lo(.text+0x4ff): undefined reference to
XCreateWindow’
SDL_x11video.lo(.text+0x528): undefined reference to XSelectInput' SDL_x11video.lo(.text+0x583): undefined reference to
XInternAtom’
SDL_x11video.lo(.text+0x5da): undefined reference to XSendEvent' SDL_x11video.lo(.text+0x5ff): undefined reference to
XGetWMHints’
SDL_x11video.lo(.text+0x61b): undefined reference to `XGetWMName’
…
What’s the missing piece - some X11 development rpm? Which one - does it
matter.
Here’s the output from various sdl tools:
$ which sdl-config
/usr/bin/sdl-config
$ sdl-config --version
1.2.5
$ locate libSDL
/usr/lib/libSDL-1.1.so.0
/usr/lib/libSDL-1.1.so.0.3.1
/usr/lib/libSDL.a
/usr/lib/libSDL.la
/usr/lib/libSDL.so
/usr/lib/libSDLmain.a
$ tail config.log
tail: config.log: No such file or directory
Thanks for any help!
- Asko###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.