Bonsoir tous le monde et joyeux noël! Voila aujourd'hui, j'ai installé Eclipse IDE for C/C++ Developers et j'ai aussi installer mingw. Pour faire du développement console en c, pas de problème. Mais c'est au moment que je veux utilisé SDL 1.2.13 qu'il pose un problème. J'ai pocéder à l'installation de la SDL de la façon suivante :

Téléchargement : SDL 1.2.13
Installation : J'ai décompressé l'archive, puis d'éplacer la sdl.dll, dans le répertoire c:\MinGW\bin\ et je l'ai mis dans mon répertoire de projet. Ensuite j'ai d'éplacer tou les fichiers includes dans c:\MinGW\include\SDL\. Enfin j'ai mis les trois lib dans c:\MinGW\lib\.

Ensuite dans mon projet je vais dans Projects|Properties|C/C++ Build|Settings dans l'onglet Tool Settings|MinGW C Linker|Libraries et enfin je rajoutes les fichiers lib mingw32, SDL, SDLmain (sans les virgules et sans rajouter les -l). Je pense que j'ai bien tous fais les link, mais j'obtiens les errreurs suivantes.


**** Build of configuration Debug for project TestSDL ****

**** Internal Builder is used for build ****
gcc -oTestSDL.exe main.o -lmingw32 -lSDL -lSDLmain
/mingw/lib/libSDLmain.a(SDL_win32_main.o): In function `console_main':
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:227: undefined reference to `SDL_strlcpy'
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:231: undefined reference to `SDL_Init'
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:232: undefined reference to `SDL_GetError'
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:243: undefined reference to `SDL_SetModuleHandle'
/mingw/lib/libSDLmain.a(SDL_win32_main.o): In function `WinMain':
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:303: undefined reference to `SDL_strlcpy'
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:304: undefined reference to `SDL_strlcat'
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:327: undefined reference to `SDL_strlcpy'
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:328: undefined reference to `SDL_strlcat'
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:370: undefined reference to `SDL_strlcpy'
/mingw/lib/libSDLmain.a(SDL_win32_main.o): In function `cleanup':
/Users/hercules/trunk/SDL-1.2/./src/main/win32/SDL_win32_main.c:157: undefined reference to `SDL_Quit'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 327 ms.
Mon code est cours :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
#include <stdio.h>
#include <stdlib.h>
#include <SDL/SDL.h>
 
int main(int argc, char **argv)
{
	return 0;
}
Si vous pouviez m'aider. Merci.