Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. [OT] Determine the compiler-version

[OT] Determine the compiler-version

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++helpquestionannouncement
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tabor25
    wrote on last edited by
    #1

    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

    O 1 Reply Last reply
    0
    • T 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

      O Offline
      O Offline
      Oliver Anhuth
      wrote on last edited by
      #2

      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

      T 1 Reply Last reply
      0
      • O Oliver Anhuth

        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

        T Offline
        T Offline
        tabor25
        wrote on last edited by
        #3

        Thank you very much, Oliver. I will use the online-help to figure out the rest. Best regards tabor25

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups