VS 2017构建X86 for 2003 R2 - .exe不是有效的Win32应用程序 [英] VS 2017 build X86 for 2003 R2 - .exe is not a valid Win32 application

查看:515
本文介绍了VS 2017构建X86 for 2003 R2 - .exe不是有效的Win32应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好, 

我们刚刚将MFC C ++解决方案迁移到VS 2017,并且exes在x64或x86计算机上正常运行(10,7,服务器但是,当试图让它们在服务器2003 r2 x86上运行时,会出现一个对话框,"。exe不是有效的Win32应用程序"。
事件查看器中没有任何内容似乎有助于进一步调查其无效原因。 

We've just migrated a MFC C++ solution to VS 2017 and the exes run properly on either x64 or x86 machines (10, 7, server 2012), however when trying to get them to run on server 2003 r2 x86 a dialog appears ".exe is not a valid Win32 Application". Nothing in event viewer appears to help further investigate as too why its not valid. 

我搜索并验证了以下建议的解决方案: 

I have searched and validated the following proposed solution: 

1。我有构建平台工具集的目标是" VS 20017 v141" 

1. That I have the build platform toolset targeted for " VS 20017 v141". 

2。我已经安装了 从2003年服务器上的14.0开始的vcredist_x86.exe。 

2. I have installed the  vcredist_x86.exe from 14.0 on the 2003 server. 

3。加倍检查构建是否为x86。 

3. Doubled check that the build is of x86. 

我已经完成了以上所有操作,但似乎无法运行此特定的exe。是否还有我缺少的设置或其他依赖项? 

I have done all the following above but can't seem to get this certain exe running. Are there anymore settings or additional dependencies i'm missing? 




推荐答案

您好,

检查_WIN32_WINNT定义(在targetver.h中)。它应该设置为0x0502。看看sdkddkver.h。

check the _WIN32_WINNT define (in targetver.h). It should be set to 0x0502. Have a look at sdkddkver.h.

问候,Guido


这篇关于VS 2017构建X86 for 2003 R2 - .exe不是有效的Win32应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆