Bonjour
J'ai un problème avec la compilation d'un petit programme SDL que j'essaie de faire. Ce qui me gène le plus, c'est que ça marchait jusqu'à hier !
J'utilise codeblock sous Linux (Mandriva cooker) et voici les commande qu'il fait avec les retours des commandes :
Sur un autre PC (Linux Mandriva 2010.0), voici ce que j'ai :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 troumad@iutb-geii-p46][~/Cours_IUT/info/SDL] $ g++ -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -g -c /home/bs/Cours_IUT/info/SDL/main.cpp -o obj/Debug/main.o [troumad@iutb-geii-p46][~/Cours_IUT/info/SDL] $ g++ -o bin/Debug/SDL obj/Debug/main.o -L/usr/lib64 -lSDL -lpthread obj/Debug/main.o: In function `main': /home/bs/Cours_IUT/info/SDL/main.cpp:92: undefined reference to `IMG_Load' /home/bs/Cours_IUT/info/SDL/main.cpp:101: undefined reference to `TTF_Init' /home/bs/Cours_IUT/info/SDL/main.cpp:107: undefined reference to `TTF_OpenFont' /home/bs/Cours_IUT/info/SDL/main.cpp:115: undefined reference to `TTF_RenderText_Solid' /home/bs/Cours_IUT/info/SDL/main.cpp:177: undefined reference to `TTF_RenderText_Solid' collect2: ld a retourné 1 code d'état d'exécutionSelon vous, le problème est où ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 [troumad@mc][~/Cours_IUT/info/SDL] g++ -o bin/D-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -g -c /home/bs/Cours_IUT/info/SDL/main.cpp -o obj/Debug/main.o [troumad@mc][~/Cours_IUT/info/SDL] urs_IUT/info/SDL/main.cpp -o obj/Debug/main.o/in -o bin/Debug/SDL obj/Debug/main.o -L/usr/lib64 -lSDL -lpthread /usr/bin/ld: Dwarf Error: Offset (4907) greater than or equal to .debug_str size (4853). obj/Debug/main.o: In function `main': /home/bs/Cours_IUT/info/SDL/main.cpp:92: undefined reference to `IMG_Load' /home/bs/Cours_IUT/info/SDL/main.cpp:101: undefined reference to `TTF_Init' /home/bs/Cours_IUT/info/SDL/main.cpp:107: undefined reference to `TTF_OpenFont' /home/bs/Cours_IUT/info/SDL/main.cpp:115: undefined reference to `TTF_RenderText_Solid' /home/bs/Cours_IUT/info/SDL/main.cpp:177: undefined reference to `TTF_RenderText_Solid' collect2: ld a retourné 1 code d'état d'exécution
Try modifying g++ parameters to include '-lSDL_ttf -lSDL_image'.
Partager