From 109f5a7a3218707fd6f71ff8f5ef85b1ad42689e Mon Sep 17 00:00:00 2001 From: Brett Hall Date: Tue, 29 Mar 2016 10:08:48 -0700 Subject: [PATCH] Fixed linker error when using VS2015 /MD Without this change links under Visual Studio 2015 using the /MDd switch ("multithreaded debug dll" c-runtime) fail with a "LNK2005: __crt_debugger_hook already defined in msvcrtd.lib(utility_desktop.obj)" error. --- fipstest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fipstest.cpp b/fipstest.cpp index 08d752e7..604ef69f 100644 --- a/fipstest.cpp +++ b/fipstest.cpp @@ -21,7 +21,11 @@ #else #define _CRT_DEBUGGER_HOOK __crt_debugger_hook #endif +#if _MSC_VER < 1900 extern "C" {_CRTIMP void __cdecl _CRT_DEBUGGER_HOOK(int);} +#else +extern "C" {void __cdecl _CRT_DEBUGGER_HOOK(int); } +#endif #endif #endif