[OT] Determine the compiler-version
-
Hello, maybe this is a little off-topic, but i don't know where to post this problem - sorry. I need to determine if my source-code is compiled by vc60 or .net, because i have to include different header-files depending on the compiler-version. I want to do it in a way like this : #ifdef _VC60 #include <..\src\afximpl.h> #else #include <..\src\mfc\afximpl.h> #endif I think that there must exist a global constant or variable that describes the compiler-version. But what is the name of this constant or variable (it's not _VC60 ;-) ). Best regards tabor25
-
Hello, maybe this is a little off-topic, but i don't know where to post this problem - sorry. I need to determine if my source-code is compiled by vc60 or .net, because i have to include different header-files depending on the compiler-version. I want to do it in a way like this : #ifdef _VC60 #include <..\src\afximpl.h> #else #include <..\src\mfc\afximpl.h> #endif I think that there must exist a global constant or variable that describes the compiler-version. But what is the name of this constant or variable (it's not _VC60 ;-) ). Best regards tabor25
You can get the compiler version with _MSC_VER. Look into the online help for the possible values. However from your example I guess that you really want to use _MFC_VER which gives you the MFC version (>= 0x0700 for MFC 7 or higher). Oliver
-
You can get the compiler version with _MSC_VER. Look into the online help for the possible values. However from your example I guess that you really want to use _MFC_VER which gives you the MFC version (>= 0x0700 for MFC 7 or higher). Oliver