Hi,
I am just starting to learn about SDL. I have found a series of articles
in Linux Format and hve been trying to get some of it to work. I have also
tried to get a piece of code off a website to work but they all seem to
give errors related to one or more of the above.
I am runnning Mandrake Linux 10.1 official and the output from the SDL FAQ
debug info is as follows :
/usr/bin/sdl-config
1.2.7
/usr/lib/libSDL-1.2.so.0.7.0
/usr/lib/libSDL-1.2.so.0
/usr/lib/libSDL_mixer-1.2.so.0.2.3
/usr/lib/libSDL_mixer-1.2.so.0
/usr/lib/libSDLmain.a
/usr/lib/libSDL.a
/usr/lib/libSDL.la
/usr/lib/libSDL.so
/usr/lib/libSDL_net.a
/usr/lib/libSDL_net-1.2.so.0
/usr/lib/libSDL_net-1.2.so.0.0.5
/usr/lib/libSDL_image-1.2.so.0
/usr/lib/libSDL_image-1.2.so.0.1.2
/usr/lib/libSDL_image.a
/usr/lib/libSDL_image.so
/usr/lib/libSDL_mixer.a
/usr/lib/libSDL_mixer.so
/usr/lib/libSDL_net.so
/usr/lib/libSDL_gfx.so.11.0.0
/usr/lib/libSDL_gfx.so.11
/usr/lib/libSDL_gfx.la
/usr/lib/libSDL_gfx.so
/usr/lib/libSDL_gfx.a
/usr/lib/libSDL_image.la
/usr/lib/libSDL_mixer.la
/usr/lib/libSDL_net.la
No errors on compiling using
./configure
make
checkinstall
my PATH is usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib
/jre-1.4.2_04/bin:/home/norman/bin
/etc/ld.so.conf is :
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/lib/qt3/lib
/usr/lib/wine
/usr/local/lib
/usr/include/SDL
/usr/lib
/usr/include/freetype2
/usr/include
/usr/include/freetype2/freetype/
/usr/include/SDL
and I did run ldconfig as root before starting.
I am launching the compiler with eg :
g++ 01.cpp -o 01A /usr/bin/sdl-config --libs
and the type of errors I get are :
/home/norman/tmp/ccIpi13y.o(.text+0xe9): In function main': : undefined reference to
IMG_Load’
collect2: ld returned 1 exit status
or
g++ TroutWars.cpp -o TrWars1 /usr/bin/sdl-config --libs
/home/norman/tmp/ccSzexKB.o(.text+0xde): In function CTWGame::CTWGame()': : undefined reference to
TTF_OpenFont’
/home/norman/tmp/ccSzexKB.o(.text+0xfd): In function CTWGame::CTWGame()': : undefined reference to
Mix_OpenAudio’
/home/norman/tmp/ccSzexKB.o(.text+0x154): In function CTWGame::CTWGame()': : undefined reference to
TTF_RenderText_Blended’
/home/norman/tmp/ccSzexKB.o(.text+0x2e1): In function CTWGame::CTWGame()': : undefined reference to
Mix_LoadMUS’
/home/norman/tmp/ccSzexKB.o(.text+0x2f9): In function CTWGame::CTWGame()': : undefined reference to
Mix_LoadMUS’
/home/norman/tmp/ccSzexKB.o(.text+0x32d): In function CTWGame::CTWGame()': : undefined reference to
Mix_LoadWAV_RW’
/home/norman/tmp/ccSzexKB.o(.text+0x47e): In function CTWGame::CTWGame()': : undefined reference to
TTF_OpenFont’
/home/norman/tmp/ccSzexKB.o(.text+0x49d): In function CTWGame::CTWGame()': : undefined reference to
Mix_OpenAudio’
/home/norman/tmp/ccSzexKB.o(.text+0x4f4): In function CTWGame::CTWGame()': : undefined reference to
TTF_RenderText_Blended’
/home/norman/tmp/ccSzexKB.o(.text+0x681): In fun
I have libSDL1.2-1.2.7-9mdk
libSDL1.2-devel-1.2.7-7mdk
libSDL_mixer1.2.5-4mdk
libSDL_mixer1.2-devel-1.2.5-4mdk
libSDL_ttf2.0-2.0.6-4mkd
SDL_ttf-devel-2.0.6-1
perl-SDL-1.20.0-10mdk
installed
I have no idea how to proceed further so would someone explain how dumb I
have been and tell me how to fix it?
Thanks,
Norman