“is not a valid win32 application” on windows xp

2019-07-26 14:49发布

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

  1. go to "configuration properties" and set the "Platform Toolset" to "visual studio 2015 - windows xp(v140_xp)"

  2. 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!

1条回答
Ridiculous、
2楼-- · 2019-07-26 15:24

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

查看更多
登录 后发表回答