I get "Undefined reference to WinMain@16"

Under Visual C++, you need to link with SDLmain.lib. Under the gcc build environments like Dev-C++ or Ultimate++ with mingw you need to link with the output of "sdl-config --libs", which is usually: -lmingw32 -lSDLmain -lSDL -mwindows

Note that the order of these linker options is important!

FAQ_Undefined_Reference_to_WinMain (last edited 2008-04-17 08:18:57 by localhost)