Navigation Menu

Skip to content

Commit

Permalink
Fixed bug 3092 - Statically link sdl2 with /MT for msvc
Browse files Browse the repository at this point in the history
Martin Gerhardy

According to https://msdn.microsoft.com/de-de/library/2kzt1wy3%28v=vs.120%29.aspx when one is using /MT for msvc compilations the libcmt.lib is already linked to the binary. This lib includes the symbol that is now guarded (see attached patch) by the #ifndef _MT.
  • Loading branch information
slouken committed Jan 2, 2016
1 parent 42065e7 commit ac444cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stdlib/SDL_stdlib.c
Expand Up @@ -275,8 +275,11 @@ int SDL_tolower(int x) { return ((x) >= 'A') && ((x) <= 'Z') ? ('a'+((x)-'A')) :

#ifndef __FLTUSED__
#define __FLTUSED__
/* the multithreaded runtime already includes libcmt.lib - and this symbol is in there. */
#ifndef _MT
__declspec(selectany) int _fltused = 1;
#endif
#endif

/* The optimizer on Visual Studio 2005 and later generates memcpy() calls */
#if (_MSC_VER >= 1400) && defined(_WIN64) && !defined(_DEBUG)
Expand Down

0 comments on commit ac444cd

Please sign in to comment.