Skip to content

Commit

Permalink
-lmingw32 is necessary in the link line before -lSDLmain, otherwise W…
Browse files Browse the repository at this point in the history
…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 eabfc8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -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
Expand Down

0 comments on commit eabfc8a

Please sign in to comment.