What's the difference between the Platform Toolsets ending in _xp
and those that don't. (For example, v140
vs v140_xp
)
Why aren't there toolsets ending with _vista
or _7
? When I compile a program on Windows 7 with the v140
toolset, will it run on Windows XP/Vista?
The Visual C++ build tools workload in the Visual Studio Build Tools will install the latest v141 toolset from VS2017 by default. The v140 toolset from VS2015 will install side-by-side with the v141 toolset.
There are three important restrictions on binary compatibility between the v140, v141, v142, and v143 toolsets and minor numbered version updates: You can mix binaries built by different versions of the v140, v141, v142, and v143 toolsets. However, you must link by using a toolset at least as recent as the most recent binary in your app.
If you still need the v140 tools in your build or CI systems, you should download the Visual Studio Build Tools from visualstudio.com. If you have any feedback or suggestions for us, let us know.
Steps to reproduce the problem: 1 install Visual Studio 2019 with desktop c++ development 2 select "MSVC v140 - VS2015 C++ Build tools" in the visual studio 2019 installer 3 create a C++ console application project 4 edit the project settings 5 select the v140_xp platform toolset 6 try to build the project More ...
Starting with Visual Studio 2012 its default toolset (v110) didn't support Windows XP anymore. So you were only able to create programs for Windows Vista und newer.
The Visual Studio developers got many protest from the users, because the users have their own customers, which were still using Windows XP. So the Visual Studio developers introduced v110_xp in Visual Studio 2012 Update 4, which also supports Windows XP.
With all later Visual Studio versions (2013 -> v120, 2015 -> v140) they continued this approach, so you have an extra toolset for Windows XP and newer (v120_xp and v140_xp).
If you create programs, which shall only be used on Windows Vista or newer, then you should use the default toolset (without the _xp suffix). But if you need your programs to run under Windows XP then you need to use the toolset with _xp suffix.
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