From eabfc8aebc94b20cdae2eeddbe9e7183504c04d5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 1 Jan 2012 11:18:03 -0500 Subject: [PATCH] -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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 65cd8c331..bd92b5e68 100644 --- a/configure.in +++ b/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