I have a c++ project that compiles well under Visual Studio 2013. Today I installed Visual Studio 2017 Professional Edition, then there's a new setting in project settings > General called "Windows SDK Version", by default is 10.0.16299.0. Since I'm compiling windows desktop programs for targeting Windows 7 systems, I changed it to 8.1, is this correct?
Open the shortcut menu for the project node, and choose Retarget projects. (In earlier versions of Visual Studio, choose Retarget SDK Version.) The Review Solution Actions dialog appears. In the Target Platform Version dropdown list, choose the version of the Windows SDK you want to target.
The Windows SDK (10.0. 22621) for Windows 11, version 22H2 provides the latest headers, libraries, metadata, and tools for building Windows applications. Use this SDK to build Universal Windows Platform (UWP) and Win32 applications for Windows 11, version 22H2 and previous Windows releases.
The Visual Studio SDK (Software Development Kit) is an optional feature in Visual Studio setup. You can also install the VS SDK later on.
It is not necessary if you limit yourself to what is possible with standard C++ (console-only output, using the C++ standard library, etc). If you don't know, but have in mind "I just want my applications to have a windows interface" then you need the windows SDK. Well, technically, you don't need the SDK.
Generally speaking, a Windows SDK supports its "main" version and also the previous ones, but you need to specify what Windows version your program will need. In fact, you're better off doing so or else you can inadvertently use features not available in the version you want to support.
Given an SDK, you indicate which older Windows version to target by defining the WINVER and _WIN32_WINNT macros somewhere in your project files or in the C/C++ Preprocessor project settings in Visual Studio.
For example, the following definitions target Windows 7:
#define WINVER 0x0601
#define _WIN32_WINNT 0x0601
For more information, see Using the Windows Headers and Modifying WINVER and _WIN32_WINNT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With