Targeting Windows XP with C++ in Visual Studio 2012

Targeting Windows XP with C++ in Visual Studio 2012

Rate This
  • Comments 72

We recently announced the Visual Studio 2012 product lineup and platform support, and as a part of this announcement we mentioned that we were evaluating options for enabling C++ developers to build applications in Visual Studio 2012 that run on Windows XP without requiring side-by-side installation of Visual Studio 2010. Today I would like to share more details about this capability.

The C++ runtime and libraries that accompany Visual Studio 2012 contain dependencies on several Windows API functions that exist only on Windows Vista and higher versions of the OS.  This means that applications built with Visual Studio 2012’s C++ compiler will fail to load and execute on Windows XP. Developers wishing to target Windows XP can use Visual Studio’s C++ multi-targeting feature, which enables the use of the Visual Studio 2010 compiler from within the new IDE. Multi-targeting enables developers to take advantage of the new features of the IDE without migrating projects to the new compiler or to use the Visual Studio 2010 compiler to build applications that target Windows XP.

Assessing Multi-targeting
The Beta release of Visual Studio 2012 offered us an opportunity to evaluate the effectiveness of C++ multi-targeting, particularly among developers that wish to target Windows XP. Feedback from customers cited two key scenarios they wanted Visual Studio 2012 to support in order to best meet their needs for Windows XP targeting:

  1. The ability to target Windows XP and higher from a single compiler and tools chain rather than resort to separate builds for XP and for Vista+.
  2. The ability to target Windows XP and higher from a single code base that employs modern C++11 language features.

In order to better meet customer needs relative to build configuration and XP targeting, we have made the decision to enhance multi-targeting to support Windows XP targeting directly from the Visual Studio 2012 C++ compiler and libraries.

Enhancing Multi-targeting
Later this fall, Microsoft will provide an update to Visual Studio 2012 that will enable C++ applications to target Windows XP. This update will make the necessary modifications to the Visual C++ 2012 compiler, runtime, and libraries to enable developers to create applications and DLLs that run on Windows XP and higher versions as well as Windows Server 2003 and higher. This update will also be included in the recently-announced Visual Studio Express 2012 for Windows Desktop.

Steve Teixeira
Director of Program Management
Visual C++

  • Thank you. Now we don't have to stick to VS2010 for 2-3 years!

    Are the C++11 conformance updates (outside the normal release/SP cycle) still planned?

  • Thanks a lot for this! We all know that reverting decisions can be hard. Kudos for making the right choice.

    After the update which allows targeting XP, VS11 is going to be viable for my team.

    What can I say, these blog things seem to work, after all. Hoping for some progress on C++11 now, since both of the reversals are still merely taking VS11 back to where we were with VS10, but you are on the right track, keep going.

  • Brilliant - that'll help us a lot.  Thanks.

    Any hint of Brief-Emulation on the horizon?

  • good, now we won't be stuck in c++98 forever ;-)

  • Thanks a lot!

    Will be waiting for more technical details for the update.

  • @Steve Teixeira

    Will VS2012 Express for Desktop allow compilation of 64-bit binaries?


  • Excellent decision.  Thank you for listening to the community!

  • Now was that so hard?  Of course it was, but whoever caused this problem in the first place is the one at fault.  Fire her immediately.  I forsee problems coming from this; you can't hack-back in without.  It's too late now.

  • Will I be able to use C++11 features (ones present and what you will be adding after RTM), while targeting for XP?

  • Jackson: Yes - for example, the range-based for-loop.

  • Don't confuse marketing with engineering.  Each controls one end of the product.  XP as a target was always in, from the beginning.  It was at the end it was 'taken out'.

  • I have     got error on my cp one if 1711 and other how can they be fix

  • Great to hear! Good decision because lots of (especially) enterprise customers have still running XP machines.

    So it's possible for software vendors to build upon the new libraries and compilers.


  • Great! For my company this was a show stopper. Now we will be able to use VS11 with new C++ features.


  • Woot, why are you feeding a dead horse?

Page 4 of 5 (72 items) 12345