Hello,
I installed Code::Blocks under Windows XP SP2, I would like to know how I can create a SDL project in C Language AND which is compiled with a "C" compiler and not MingW-g++ but rather MingW-GCC for example !
I installed SDL myself because I have not found a installer of files of development and runtime.
The headers files is in the repertory "...\include\SDL\" and the libs in "...\lib\" of the repertory of C::B.
Here the error of compilation with the default SDL project (C++) - (just for testing but I want e C/SDL project):
Project : SDL Application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Franck\Mes documents\sdlapp\
--------------------------------------------------------------------------------
Switching to target: default
Linking console executable: SDLapp.exe
..\..\..\..\Program Files\CodeBlocks\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.9\Src\M:(.text[_main]+0x0): multiple definition of `main'
C:\Program Files\CodeBlocks\lib/libmingw32.a(main.o):main.c:(.text+0x0): first defined here
Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized
..\..\..\..\Program Files\CodeBlocks\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.9\Src\M:(.text[_main]+0x55): undefined reference to `_alloca_probe'
..\..\..\..\Program Files\CodeBlocks\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.9\Src\M:(.text[_main]+0xc8): undefined reference to `SDL_SetModuleHandle'
..\..\..\..\Program Files\CodeBlocks\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.9\Src\M:(.text[_WinMain@16]+0x162): undefined reference to `_alloca_probe'
..\..\..\..\Program Files\CodeBlocks\lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\SDL-1.2.9\Src\M:(.text[_WinMain@16]+0x1a5): undefined reference to `_alloca_probe'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 1 warnings
Thanks for all !