Skip to content
Permalink
Browse files

-lmingw32 is necessary in the link line before -lSDLmain, otherwise W…

…inMain 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.
  • Loading branch information
slouken committed Jan 1, 2012
1 parent 05a78b8 commit eabfc8aebc94b20cdae2eeddbe9e7183504c04d5
Showing with 1 addition and 1 deletion.
  1. +1 −1 configure.in
@@ -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

0 comments on commit eabfc8a

Please sign in to comment.