I have recently upgraded from Visual Studio Express 2010 to Visual Studio 2012 Express for Windows Desktop. I'm aware of the previous lack of compatibility targeting Windows XP, but thought this was resolved by Update 1 (which I have installed).
However, I'm still having difficulty targeting Win XP with the C++ applications I have compiled using 2012 Express. I have set the Platform Toolset to "Visual Studio 2012 - Windows XP (v110_xp)" but this makes no difference. When I try to run my compiled application on my Windows XP system (I run Windows XP via VirtualBox), I get an the error that my application "is not a valid Win32 application."
I have also tried setting the CLR Support to "No Common Language Runtime Support" and the Runtime Library to "Multi-threaded (/MT)".
Even with a very basic blank C++ project using the following code, I just can't get it to run on XP:
#define _WIN32_WINNT 0x0501
#define WINVER 0x0501
#define NTDDI_VERSION 0x0501
#include <iostream>
int main()
{
std::cout << "TEST" << std::endl;
std::cout << std::endl << std::endl << "Press ENTER to close this window.";
std::cin.get();
return 0;
}
Can anybody tell me where I'm going wrong with my compiler/project settings?
P.s. I have installed the MS VC++ 2010 and 2012 redistributable packages on my XP virtual machine. Applications that I compiled with Visual Studio Express 2010 work fine on my XP virtual machine.