When I want to build a project with wxwindows or SDL, I get the following error
C:/MinGW/lib/libwxmsw242.a(app.o)(.text+0x1a20):app.cpp: multiple definition of `WinMain@16'
Is there something to do about it without making my own WinMain?
This is very old, but it's the closest thing I've found to my problem. I get the same thing when trying to build an SDL project. I installed Code::blocks bundled with mingw, added the SDL library paths for lib and include to the compiler options, and changed the #include <SDL/SDL.h> to #include <SDL.h>. That gets me through compiling, but linking fails with an error very like the one listed above:
C:/Program Files/SDL-1.2.8/lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\public_cvs\SDL-:(.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
C:/Program Files/SDL-1.2.8/lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\public_cvs\SDL-:(.text[_main]+0x55): undefined reference to `_alloca_probe'
C:/Program Files/SDL-1.2.8/lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\public_cvs\SDL-:(.text[_WinMain@16]+0x162): undefined reference to `_alloca_probe'
C:/Program Files/SDL-1.2.8/lib\SDLmain.lib(./Release/SDL_win32_main.obj):C:\public_cvs\SDL-:(.text[_WinMain@16]+0x1a5): undefined reference to `_alloca_probe'
Any ideas? I've been trying to figure out how to get SDL to work with code::Blocks for hours. I've tried compiling with both mingw and VC, and neither path has worked for me. I've looked at all the SDL tutorials I could find, and none of them work. Thanks for any help!