-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 614329811864f4cf
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
     1.1 --- a/configure.in	Sat Dec 31 18:04:17 2011 -0500
     1.2 +++ b/configure.in	Sun Jan 01 11:18:03 2012 -0500
     1.3 @@ -2551,7 +2551,7 @@
     1.4          SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
     1.5          SDLMAIN_LDFLAGS="-static"
     1.6          SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
     1.7 -        SDL_LIBS="-lSDLmain $SDL_LIBS -mwindows"
     1.8 +        SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
     1.9          ;;
    1.10      *-wince*)
    1.11          ARCH=win32