-lmingw32 is necessary in the link line before -lSDLmain, otherwise WinMain in libSDLmain.a won't get linked in SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sun, 01 Jan 2012 11:18:03 -0500
branchSDL-1.2
changeset 6143 29811864f4cf
parent 6142 b786823f0f46
child 6144 20d04c674a08
-lmingw32 is necessary in the link line before -lSDLmain, otherwise WinMain in libSDLmain.a won't get linked in If this happens you'll get "undefined reference to `_WinMain@16'" when trying to link applications that use SDL.
configure.in
--- a/configure.in	Sat Dec 31 18:04:17 2011 -0500
+++ b/configure.in	Sun Jan 01 11:18:03 2012 -0500
@@ -2551,7 +2551,7 @@
         SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
         SDLMAIN_LDFLAGS="-static"
         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
-        SDL_LIBS="-lSDLmain $SDL_LIBS -mwindows"
+        SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
         ;;
     *-wince*)
         ARCH=win32