Skip to content

Commit

Permalink
Actually, this is needed for building with Visual Studio with both /M…
Browse files Browse the repository at this point in the history
…T 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
  • Loading branch information
slouken committed Feb 18, 2018
1 parent 3c9d333 commit 58f9be1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/SDL.c
Expand Up @@ -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
Expand All @@ -469,4 +471,6 @@ _DllMainCRTStartup(HANDLE hModule,
}
#endif /* building DLL with Watcom C */

#endif /* __WIN32__ */

/* vi: set sts=4 ts=4 sw=4 expandtab: */

0 comments on commit 58f9be1

Please sign in to comment.