2

I'm developing a MFC application on VS 2013.

My application didn't execute on WIN XP 32bit when I built it with WIN32 Platform Option.

I dealt with this problem by setting 'v120_xp Platform Toolset'.

While doing that, I found 'v120_xp' item was added on 'v_120_xp Platform Toolset'.
I want to to know the difference between v120_xp and v120 on VS2013? Does anybody know why they are divided and how those two work differently?

Tim
  • 41,901
  • 18
  • 127
  • 145
lucidmaj7
  • 77
  • 1
  • 10
  • Basically `v120_xp` allows you to target Windows XP, whereas `v120` is only for targetting Vista and newer. – Jabberwocky Sep 15 '15 at 07:31
  • what is the difference internally? – lucidmaj7 Sep 15 '15 at 07:33
  • I don't know exactly, but it seems that `V120` generated executables use extensions that are not supported on Windows XP. This [SO question](http://stackoverflow.com/questions/24240371/vs2013-v120-xp-as-platform-toolset-by-default) may help. – Jabberwocky Sep 15 '15 at 07:43

1 Answers1

5

The v120_xp is the C++ toolchain that targets XP SP3. The other, v120 targets above XP. The XP toolchain generates code and uses the system function calls limited to XP SP3.

From the MSDN articles and blogs, the internal differences are tied to improvements in the platform that are not available on XP;

  1. Building HLSL
  2. Debugging DirectX
  3. Static analysis
  4. Remote debugging
  5. Process status API

The code generated for XP SP3 still works (generally) on the higher version of the OS, but you can't use the v120 tools to target XP, only Vista and above. Originally, they were not going to support XP, but because of the demand, it was added (during the public testing phase IIRC).

Niall
  • 30,036
  • 10
  • 99
  • 142
  • using v120_xp build option, It works on Vista, 7 8 10 ? no problem? – lucidmaj7 Sep 15 '15 at 07:34
  • 1
    Correct, the code generated for XP still works (generally) on the higher OS, but you can't use the `v120` tools to target XP, only Vista and above. Originally, they were not going to support XP, but because of the demand, it was added. – Niall Sep 15 '15 at 07:36
  • @lucidmaj7 yes, we also build our software with the v120_xp option and they work fine on all newer systems. – Jabberwocky Sep 15 '15 at 07:38
  • why do you need to support XP? Using the old version may limit you to the old features and you can't use newer APIs from Vista and above – phuclv Sep 15 '15 at 08:42
  • 1
    @LưuVĩnhPhúc. Who was that directed at? In my case, we do still have client machines that run XP (they are decreasing but they still there). In general I am moving away from XP. What you say is all true, but unfortunately some people are still stuck with it due to reason beyond their control. – Niall Sep 15 '15 at 08:44
  • @Niall: But do you need to supply new software to clients that can't update their existing software anyway? Can't you just say "For customers using Windows XP, the latest supported version is ACME Widgetizer 3.2." – MSalters Sep 15 '15 at 11:32
  • 1
    @MSalters. Yes they need to get the latest updates and application features; they are enterprise grade, self service type devices. Being able to use new toolchains helps us, but the customer requires it to work with all the constraints currently imposed. Upgrades can and do happen, but not easily. – Niall Sep 15 '15 at 11:49