-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.

--HG--
branch : SDL-1.2
This commit is contained in:
Sam Lantinga
2012-01-01 11:18:03 -05:00
parent 69dfb0a1f8
commit b2b79f3f26

View File

@@ -2551,7 +2551,7 @@ case "$host" in
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