From 58f9be125741b235b3c1bdfe7e0df67422ecce02 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 18 Feb 2018 09:09:56 -0800 Subject: [PATCH] Actually, this is needed for building with Visual Studio with both /MT and /MD. With the previous change, I get: 1> Creating library C:\projects\SDL\VisualC\Win32\Debug\SDL2.lib and object C:\projects\SDL\VisualC\Win32\Debug\SDL2.exp 1>LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 --- src/SDL.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SDL.c b/src/SDL.c index 354f2bc43..0494a165e 100644 --- a/src/SDL.c +++ b/src/SDL.c @@ -451,7 +451,9 @@ SDL_GetPlatform() #endif } -#if defined(__WIN32__) && defined(__WATCOMC__) && defined(BUILD_DLL) +#if defined(__WIN32__) + +#if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL)) /* Need to include DllMain() on Watcom C for some reason.. */ BOOL APIENTRY @@ -469,4 +471,6 @@ _DllMainCRTStartup(HANDLE hModule, } #endif /* building DLL with Watcom C */ +#endif /* __WIN32__ */ + /* vi: set sts=4 ts=4 sw=4 expandtab: */