From: Václav Slavík Date: Sat, 9 Aug 2003 20:23:25 +0000 (+0000) Subject: check if we are using compatible C++ ABI when usin GCC or IntelC++ X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f48eebbc6213d897b430da396aad8099f2558de1 check if we are using compatible C++ ABI when usin GCC or IntelC++ git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/build.h b/include/wx/build.h index a9bf3923ab..3e7ea2219a 100644 --- a/include/wx/build.h +++ b/include/wx/build.h @@ -18,7 +18,8 @@ // WX_BUILD_OPTIONS_SIGNATURE // ---------------------------------------------------------------------------- -#define __WX_BO_STRINGIZE(x) #x +#define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x) +#define __WX_BO_STRINGIZE0(x) #x #if (wxMINOR_VERSION % 2) == 0 #define __WX_BO_VERSION(x,y,z) \ @@ -39,11 +40,21 @@ #else #define __WX_BO_UNICODE "ANSI" #endif - + +// GCC and Intel C++ share same C++ ABI, check if compiler versions are +// compatible: +#if (defined(__GNUG__) || defined(__INTEL_COMPILER) && \ + defined(__GXX_ABI_VERSION)) + #define __WX_BO_COMPILER \ + ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION) +#else + #define __WX_BO_COMPILER +#endif + // This macro is passed as argument to wxConsoleApp::CheckBuildOptions() #define WX_BUILD_OPTIONS_SIGNATURE \ __WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \ - " (" __WX_BO_DEBUG "," __WX_BO_UNICODE ")" + " (" __WX_BO_DEBUG "," __WX_BO_UNICODE __WX_BO_COMPILER ")"