[SDL] about initialize sdl

Crystalandy crystalandy at etang.com
Mon Jan 20 17:51:01 PST 2003

Try using `sdl-config --cflags` when compiling and `sdl-config --libs` when 

On Monday 06 January 2003 03:40 pm, you wrote:
> I'm playing around with linux for the first time and I'm trying to
> create a Makefile for a very simple SDL program that does nothing but
> initialize graphics and does the event loop until escape is pressed. It
> has one file, main.cpp.  This is what my Makefile looks like:
> ----------------------------------------------
> test: main.cpp
> 	gcc -c main.cpp
> 	gcc main.o -lSDL -o test
> ----------------------------------------------
> When I run make on this, it shows me all kinds of stuff, starting with
> ----------------------------------------------
> [micah at mandrake9 test]$ make
> gcc -c main.cpp
> gcc main.o -lSDL -o test
> main.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
> /usr//bin/../lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../../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//bin/../lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../../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'
> ----------------------------------------------
> and the errors just keep coming.  I have a feeling this is either a
> messed up installation of SDL-devel (which I don't think it is, because
> I used the RPM), or my Makefile is somehow messed up.  Can anyone help?
> Thanks.
> - Micah
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl

More information about the SDL mailing list