SDL and KDevlop

To day i did my first atempt to comple a SDL project for linux with
KDevlop… and this is what I got :frowning:
The SDL and KDevlop help file on libsdl.org didn’t help me. In windows I use
Dev-C++ without any problems.****************************************************************************


gmake all-recursive
gmake[1]: Entering directory /home/perra/sdl_test_1' Making all in sdl_test_1 gmake[2]: Entering directory/home/perra/sdl_test_1/sdl_test_1’
/bin/sh …/libtool --mode=link --tag=CXX
c++ -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -o sdl_test_1
main.o -lSDL -L/usr/lib/SDL
c++ -O2 -O0 -g3 -Wall -fno-exceptions -fno-check-new -o sdl_test_1 main.o
/usr/lib/libSDL.so -lm -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXxf86dga -l
Xv -lXinerama -ldl -L/usr/lib/SDL
/usr/lib/libSDL.so: undefined reference to pthread_create' /usr/lib/libSDL.so: undefined reference topthread_cancel’
/usr/lib/libSDL.so: undefined reference to sem_destroy' /usr/lib/libSDL.so: undefined reference tosem_wait’
/usr/lib/libSDL.so: undefined reference to sem_post' /usr/lib/libSDL.so: undefined reference topthread_mutexattr_setkind_np’
/usr/lib/libSDL.so: undefined reference to sem_init' /usr/lib/libSDL.so: undefined reference topthread_sigmask’
/usr/lib/libSDL.so: undefined reference to sem_trywait' /usr/lib/libSDL.so: undefined reference topthread_mutexattr_init’
/usr/lib/libSDL.so: undefined reference to sem_getvalue' /usr/lib/libSDL.so: undefined reference topthread_join’
/usr/lib/libSDL.so: undefined reference to pthread_cond_timedwait' collect2: ld returned 1 exit status gmake[2]: *** [sdl_test_1] Error 1 gmake[2]: Leaving directory/home/perra/sdl_test_1/sdl_test_1’
gmake[1]: Leaving directory `/home/perra/sdl_test_1’
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive-am] Error 2
*** failed ***

//Perra

Is this KDevelop 2.x? With KDevelop 2.1, that howto is slightly different.
Rather than adding

dnl Check for SDL
SDL_VERSION=1.2.0
AM_PATH_SDL($SDL_VERSION,
:,
AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])
)
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"

to configure.in, you have to add it to configure.in.in. That was the only
change I had to make to get SDL and KDevelop 2.1 to get along. If you add
that to configure.in, it will eventually get overwritten. Follow the rest of
the howto to the tee.

MattOn Sunday 29 September 2002 14:18, Fredrik persson wrote:

To day i did my first atempt to comple a SDL project for linux with
KDevlop… and this is what I got :frowning:
The SDL and KDevlop help file on libsdl.org didn’t help me. In windows I
use Dev-C++ without any problems.

To day i did my first atempt to comple a SDL project for linux with
KDevlop… and this is what I got :frowning:
The SDL and KDevlop help file on libsdl.org didn’t help me. In windows I use
Dev-C++ without any problems.

It sounds like you need to add the “pthread” library to the library list,
with -lpthread. I’m not that familiar with KDevelop but there must be
something in it to add new libraries.

NickOn Sun, 29 Sep 2002, Fredrik persson wrote: