C, C++ and Intel Visual Fortran applications built using Microsoft Visual Studio 2012 or 2013 may fail to run on Windows XP or Windows Server 2003. The typical failure mode is the error "<path to executable> is not a valid Win32 application." The first cause of this error is that the Microsoft Visual C++ libraries included in the original release of Visual Studio 2012, used for building C, C++ and Intel Visual Fortran applications, make use of Windows API routines not present in those earlier versions of Windows.
This problem is partially resolved by installing Service Pack 1 of Visual Studio 2012. It provides C++ libraries that are compatible with Windows XP and also installs a Platform SDK that is compatible with Windows XP. For more information, see Windows XP Targeting with C++ in Visual Studio 2012. This does not apply to Visual Studio 2013
There is one additional step you must take after installing Service Pack 1 (or a later Service Pack) of Visual Studio 2012, or if you use Visual Studio 2013:
For C/C++ projects, right click on the project and select Properties. On the Configuration Properties. Change Configuration to "All Configurations". On the Configuration Properties > General page, change Platform Toolset to:
- In Visual Studio 2012: "Visual Studio 2012 - Windows XP (v110_xp)". Click OK.
- In Visual Studio 2013: "Visual Studio 2013 - Windows XP (v120_xp)". Click OK
For Fortran projects, right click on the project and select Properties. Change Configuration to "All Configurations". Go to Linker > System. Change Subsystem to "Not Set". Now go to Linker > Command Line. If it is a Console application, type in the Additional Options field:
if it is a Windows app, type in:
Now rebuild the application.