12

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?

Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
patrykbajos
  • 384
  • 3
  • 17
  • Related: [How to target Windows XP in Microsoft Visual Studio C++](https://stackoverflow.com/q/35664861/3357935) – Stevoisiak Aug 27 '18 at 20:43

1 Answers1

14

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.

David Gausmann
  • 1,570
  • 16
  • 20
  • Are there any differences in features of toolsets with _xp and without, or maybe it's just minimal version of system? – patrykbajos Apr 19 '16 at 20:17
  • 1
    Yes there are some differences in some specific stuff like DirectX. The differences are listed here: https://blogs.msdn.microsoft.com/vcblog/2012/10/08/windows-xp-targeting-with-c-in-visual-studio-2012/ – David Gausmann Apr 21 '16 at 06:44
  • 1
    To target XP in Visual Studio 2015 & 2017, you will need to manually select `Windows XP support for C++` in the VS Installer ([source](https://stackoverflow.com/q/35664861/3357935)) – Stevoisiak Aug 27 '18 at 20:46