I tried to compile an application for Windows XP; the normal executable gives the error:
"... is not a valid Win32 application."
I read that I could create an XP-compatible executable by changing the Platform Toolset to Visual Studio 2015 - Windows XP (v140_xp)
, but when I do that and then try to compile it gives me the following errors:
Cannot open include file: 'Windows.h': No such file or directory
Could not find WindowsSdkDir_71A variable from registry. TargetFrameWorkVersion or Platform toolset may be set to an invalid version number.
How can I compile with this toolset version?
h'". That problem happens because the file, which is needed to compile programs that make calls to the Windows operating system, is not installed. To fix this, download and install the Microsoft Windows SDK for your system (it is free). Once the SDK is installed, add the file paths to Visual Studio.
h is a Windows-specific header file for the C and C++ programming languages which contains declarations for all of the functions in the Windows API, all the common macros used by Windows programmers, and all the data types used by the various functions and subsystems.
The toolset supplied in Visual Studio 2019 and later doesn't include support for creating code for Windows XP. Support for Windows XP development is available by using the Visual Studio 2017 v141_xp toolset. You can install the v141_xp toolset as an individual component option in the Visual Studio Installer.
After setting the Platform Toolset to Visual Studio 2015 - Windows XP (v140_xp)
, you close VS 2015 and reopen your project. It will automatically give a pop up that will tell you to install some files for supporting Windows XP projects.
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