简体   繁体   中英

Build application for windows XP

I need to build application that could run on Windows XP. For this reason I found option Platform Toolset that might be set to Visual Studio 2012 - Windows XP (v110_xp) and definition #define _WIN_VER 0x0501 . What does Platform Toolset does and maybe I don't need it if I define _WIN_VER 0x0501 ?

When you build with VS 2012 using the "v110" Platform Toolset, you are using the VS 2012 compiler and C Runtime building with the Windows 8.0 SDK. This must target Windows Vista or later because the Windows 8.0 SDK does not support building applications for Windows XP or Windows Server 2003. By default it targets Windows 8 or later, but you can set the preprocessor symbol _WIN32_WINNT to 0x0600 for Windows Vista or later, or 0x0601 for Windows 7 or later.

When you build with VS 2012 using the "v110_xp" Platform Toolset, you are using the VS 2012 compiler and C Runtime building with the Windows 7.1A SDK--the last version of the Windows SDK to support targeting Windows XP SP3 / Windows Server 2003 SP2.

Be sure to read this Visual C++ blog post and this DirectX SDK blog post for important information about using the Windows XP Platform Toolsets.

Note: With VS 20123, the "v120" Platform Toolset builds with the VS 2013 compiler, C Runtime, and Windows 8.1 SDK. It defaults to targeting Windows 8.1, but you can set the preprocessor symbol _WIN32_WINNT to 0x0600 for Windows Vista or later, 0x0601 for Windows 7 or later, or 0x0602 for Windows 8 or later. The "v120_xp" Platform Toolset builds with the VS 2013 compiler, C Runtime, and Windows 7.1A SDK.

It's just toolset . Maybe you installed only visual studio 2012, and if so you could see Visual Studio 2012 (v110) and Visual Studio 2012 - Windows XP (v110_xp) .

In my case, I use several version of visual studio, so I can see Visual Studio 2008 (v90) , Visual Studio 2010 (v100) , etc. If I select Visual Studio 2008 (v90) , the program is compiled with vs2008, even if I'm working on vs2012.

At first, VS2012 doesn't support windows xp, so its toolset also doesn't support windows xp. But after many developers ask MS to support winxp, MS adds a toolset for winxp, v110_xp . So you should use v110_xp toolset if you want to build application for windows xp.


Maybe you don't need set _WIN_VER , because vs2012 already defined it over Windows Vista at least.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM