From f1dfb27cb1d43ec5b2e304d36d3fbc98e461eeed Mon Sep 17 00:00:00 2001 From: kathoum Date: Sat, 16 Dec 2017 15:57:02 +0100 Subject: [PATCH] Use the same ABI version string for MSVS 2017 as for MSVS 2015 MSVS 2017 (which uses _MSC_VER from 1910 to 1912 currently) is ABI-compatible with MSVS 2015 (_MSC_VER 1900), so do allow linking code compiled with one of them with the library built by the other one. Closes #18024. --- include/wx/build.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/wx/build.h b/include/wx/build.h index 241314c23e..ec4be87bda 100644 --- a/include/wx/build.h +++ b/include/wx/build.h @@ -67,7 +67,14 @@ #define __WX_BO_COMPILER ",GCC " \ __WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__) #elif defined(__VISUALC__) - #define __WX_BO_COMPILER ",Visual C++ " __WX_BO_STRINGIZE(_MSC_VER) + // VC15 (a.k.a. MSVS 2017) is ABI-compatible with VC14 (MSVS 2015), so use + // the same ABI version for both of them. + #if _MSC_VER >= 1900 && _MSC_VER < 2000 + #define wxMSVC_ABI_VERSION 1900 + #else + #define wxMSVC_ABI_VERSION _MSC_VER + #endif + #define __WX_BO_COMPILER ",Visual C++ " __WX_BO_STRINGIZE(wxMSVC_ABI_VERSION) #elif defined(__INTEL_COMPILER) // Notice that this must come after MSVC check as ICC under Windows is // ABI-compatible with the corresponding version of the MSVC and we want to