From cc6ce270dc2f97542f3204d240d2dbe04a889a0a Mon Sep 17 00:00:00 2001 From: Enrico Giordani Date: Mon, 2 May 2016 09:41:20 +0200 Subject: [PATCH] [Fix] Linking error on some platforms using VS2015. Fixes issue #454. Credits to @fangguanya for the fix. --- src/Win32_Interop/win32fixes.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Win32_Interop/win32fixes.h b/src/Win32_Interop/win32fixes.h index b4f4d4ae..c2a33622 100644 --- a/src/Win32_Interop/win32fixes.h +++ b/src/Win32_Interop/win32fixes.h @@ -55,12 +55,21 @@ #endif #endif +#ifdef __cplusplus +extern "C" +{ +#endif + /* strtod does not handle Inf and Nan, we need to do the check before calling strtod */ #undef strtod #define strtod(nptr, eptr) wstrtod((nptr), (eptr)) double wstrtod(const char *nptr, char **eptr); +#ifdef __cplusplus +} +#endif + // access check for executable uses X_OK. For Windows use READ access. #ifndef X_OK #define X_OK 4 -- GitLab