Phenomenon:
Build a c++ program using visual studio express 2015 on windows 7 platform. Copy the executable file to xp system, cannot run with the error"not a valid win32 application"
Have tried two things
go to "configuration properties" and set the "Platform Toolset" to "visual studio 2015 - windows xp(v140_xp)"
go to "configuration Manager" and set the Platform to "Win32" (instead of x64) after these steps, still gives me same problem.
anyone knows what is the root cause of this problem? thank you!
The main problem is the Windows SDK that you are using.
Most recent Windows SDK have a compatibility list that will go far back to Windows 7.
Here are two useful links: https://blogs.msdn.microsoft.com/vcblog/2015/07/24/setup-changes-in-visual-studio-2015-affecting-c-developers/ Targetting Windows xp from visual studio 2015 enterprise update 1