Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit afb17e2

Browse files
niklworsOpenModelica-Hudson
authored andcommitted
fix for visual studio 2015
1 parent c4d4d2e commit afb17e2

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

SimulationRuntime/cpp/Include/Core/ModelicaDefine.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,28 @@ typedef double coshRetType;
6868
#define BOOST_ALL_DYN_LINK
6969
#endif
7070
#endif
71+
72+
// Visual C++ 2015 by default does not link the CRT if the entry point is overriden. Force linking. Macros according to
73+
// "MSDN — Predefined Macros"; library names according to "Visual C++ Team Blog — Introducing the Universal CRT".
74+
#if _MSC_VER >= 1900
75+
# if _DEBUG
76+
# if _DLL
77+
# pragma comment(lib, "vcruntimed")
78+
# pragma comment(lib, "ucrtd")
79+
# else
80+
# pragma comment(lib, "libvcruntimed")
81+
# pragma comment(lib, "libucrtd")
82+
# endif
83+
# else
84+
# if _DLL
85+
# pragma comment(lib, "vcruntime")
86+
# pragma comment(lib, "ucrt")
87+
# else
88+
# pragma comment(lib, "libvcruntime")
89+
# pragma comment(lib, "libucrt")
90+
# endif
91+
# endif
92+
#endif
93+
94+
7195
/** @} */ // end of core

0 commit comments

Comments
 (0)