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