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.