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. VS2019 - is there a way to dump, display or list what a projects macro definitions are?

VS2019 - is there a way to dump, display or list what a projects macro definitions are?

Scheduled Pinned Locked Moved C / C++ / MFC
c++questioncsshelp
4 Posts 2 Posters 3 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.
  • C Offline
    C Offline
    charlieg
    wrote on last edited by
    #1

    I have a very simple project that I am converting from VS2015 to VS2019. The project "converts" successfully but will not compile due to: "fatal error C1189: #error: MFC does not support NTDDI_VERSION less than NTDDI_WINXP. Please change the definition of NTDDI_VERSION in your project properties or precompiled header." I've turned off precompiled headers and added to my stdafx.h the following line: #define NTDDI_VERSION 0x0A00 I've also tried #define NTDDI_VERSION _WIN32_WINNT_WIN10 stdafx.cpp will not compile. So, my question stands - is there a method to determine all of the project macro settings?

    Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

    C 1 Reply Last reply
    0
    • C charlieg

      I have a very simple project that I am converting from VS2015 to VS2019. The project "converts" successfully but will not compile due to: "fatal error C1189: #error: MFC does not support NTDDI_VERSION less than NTDDI_WINXP. Please change the definition of NTDDI_VERSION in your project properties or precompiled header." I've turned off precompiled headers and added to my stdafx.h the following line: #define NTDDI_VERSION 0x0A00 I've also tried #define NTDDI_VERSION _WIN32_WINNT_WIN10 stdafx.cpp will not compile. So, my question stands - is there a method to determine all of the project macro settings?

      Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

      C Offline
      C Offline
      charlieg
      wrote on last edited by
      #2

      Solved - ignore all of the online garbage. create a dummy VS2019 application. There you will see that Microsoft has migrated to using targetver.h which includes: #include That's the secret.

      Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

      L 1 Reply Last reply
      0
      • C charlieg

        Solved - ignore all of the online garbage. create a dummy VS2019 application. There you will see that Microsoft has migrated to using targetver.h which includes: #include That's the secret.

        Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Hi Charlie, Good to see that you fixed your issue. Just in case the search engines index this question I wanted to add that you can use the /P compiler option[^] to dump the preprocessor to file. Best Wishes, -David Delaune

        C 1 Reply Last reply
        0
        • L Lost User

          Hi Charlie, Good to see that you fixed your issue. Just in case the search engines index this question I wanted to add that you can use the /P compiler option[^] to dump the preprocessor to file. Best Wishes, -David Delaune

          C Offline
          C Offline
          charlieg
          wrote on last edited by
          #4

          Thanks for that tip. Exactly what I was looking for.

          Charlie Gilley “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759 Has never been more appropriate.

          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