Sdl-config, KDevelop, and g++ problem

Hi there,

I’m working on a project using SDL 1.2.4 in KDevelop at the moment, and I’m
having trouble compiling. Initially I just added -lSDL into the “other
libraries” field, and this works fine, but this isn’t very portable so I
modified the configure.in.in and acinclude.m4.in files as described in the
"SDL & KDevelop mini-howto". This works OK until it gets to compiling my C++
source files, at which point g++ barfs on some flags it gets from sdl-config:

— snip —
/bin/sh …/libtool --mode=link --tag=CXX g++ -I/usr/local/include
-I/usr/local/include/SDL -D_REENTRANT -o eboxgui main.o -lpthread -L/usr/lib
-lSDL_gui -llirc_client -lxml2 -L/usr/local/lib -Wl,-rpath,/usr/local/lib
-lSDL -lpthread -lSDL_image -lSDL_ttf -lSDL_gui
g++ -I/usr/local/include -I/usr/local/include/SDL -D_REENTRANT -o eboxgui
main.o -rpath /usr/local/lib -L/usr/lib /usr/local/lib/liblirc_client.so
/usr/lib/libxml2.so -L/usr/local/lib /usr/lib/libartsc.so /usr/lib/libesd.so
-laudiofile -lm -L/usr/X11R6/lib -lX11 -lXext -ldl /usr/lib/libjpeg.so -lpng
-lz /usr/lib/libfreetype.so /usr/local/lib/libSDL_gui.so
/usr/local/lib/libSDL_ttf.so /usr/local/lib/libSDL.so -lpthread
/usr/local/lib/libSDL_image.so
g++: unrecognized option `-rpath’
/usr/local/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
— snip —

Have I put something in the wrong place perhaps?

Thanks,
Paul Eggleton

Oh, one thing I forgot: I am using Red Hat 7.3’s g++ (2.96).

  • Paul

Oh, one thing I forgot: I am using Red Hat 7.3’s g++ (2.96).

As an aside, this compiler is broken. You should back down to 2.95.X
or fully upgrade to gcc 3.X

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Sam Lantinga wrote:

Oh, one thing I forgot: I am using Red Hat 7.3’s g++ (2.96).

As an aside, this compiler is broken. You should back down to 2.95.X
or fully upgrade to gcc 3.X

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

How do ya mean broken ? :S
i can’t seem te get SDL compiling either on Redhat 7.3 in Kdevelop
i’t still refuses to accept the identifyers