Hi,
I am trying to compile a sample SDL program, and I keep getting a:
undefined reference to `_WinMain@16'
problem.
I am using the SDL 1.2.13 mingw build from
http://www.libsdl.org/download-1.2.phpSDL-devel-1.2.13-mingw32.tar.gz (Mingw32)
And a SDL sample program from here:
http://friedspace.com/SDLTest.cThis is the command line the compiler is using:
mingw32-g++.exe -LC:\lib\SDL-1.2.13\lib -o "bin\Debug\sdl test.exe" obj\Debug\main.o C:\lib\SDL-1.2.13\lib\libSDL.dll.a C:\lib\SDL-1.2.13\lib\libSDLmain.a
This is the output:
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.text+0x104): undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
I have set the project to 'console' and set the include directory for SDL and added libSDL.dll.a and libSDLmain.a libraries.
Does anyone know how to solve the undefined reference problem?