如何使用 Visual C 编译 64 位应用程序2010年快递?
有没有一种简单的方法可以使用 32 位版本的 Visual C++ 2010 Express 编译 64 位应用程序?如果有的话,需要哪些配置?
Is there a simple way to compile a 64 bit app with the 32-bit edition of Visual C++ 2010 Express? What configurations, if any, are necessary?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
以下是分步说明:
无论如何,这些步骤对我有用。有关步骤 2 的更多详细信息,请参阅之前发帖人提到的 Microsoft 参考资料: http://msdn.microsoft.com/en-us/library/9yb4317s.aspx。
Here are step by step instructions:
These steps have worked for me, anyway. Some more details on step 2 can be found in a reference from Microsoft that a previous poster mentioned: http://msdn.microsoft.com/en-us/library/9yb4317s.aspx.
如何:将 Visual C++ 项目配置为面向 64 位平台
参考:
http://msdn.microsoft.com/en-us/library/9yb4317s.aspx
How to: Configure Visual C++ Projects to Target 64-Bit Platforms
Ref:
http://msdn.microsoft.com/en-us/library/9yb4317s.aspx
请确保您下载的是 Windows7.1 SDK,而不仅仅是 Windows 7。这让我很头疼。
And make sure you download the Windows7.1 SDK, not just the Windows 7 one. That caused me a lot of head pounding.
我发现添加一个重要的步骤 - 安装 SDK 后,转到项目属性并将配置属性 -> 常规 -> 平台工具集从 v100 或其他任何内容更改为 Windows7.1SDK。这会将 $(WindowsSdkDir) 更改为正确的位置,并且似乎也解决了我遇到的其他一些困难。
I found an important step to add to this - after you've installed the SDK, go to your project properties and change Configuration Properties->General->Platform Toolset from v100 or whatever it is to Windows7.1SDK. This changes $(WindowsSdkDir) to the proper place and seemed to solve some other difficulties I was encountering as well.
请注意,如果安装了 Windows SDK v7.1,则在将 Visual Studio 2010 Professional 或 Visual Studio 2010 Express 升级到 Visual Studio 2010 SP1 时,Visual C++ 编译器将被删除。
有关解决此问题的说明,请参阅 Microsoft 支持网站上的 KB2519277。
Note that Visual C++ compilers are removed when you upgrade Visual Studio 2010 Professional or Visual Studio 2010 Express to Visual Studio 2010 SP1 if Windows SDK v7.1 is installed.
For instructions on resolving this, see KB2519277 on the Microsoft Support site.
下载Windows SDK,然后转到查看->属性->配置管理器->Active Solution Platform->新建->x64。
Download the Windows SDK and then go to View->Properties->Configuration Manager->Active Solution Platform->New->x64.
64 位环境中的编程与 32 位环境中的编程有很大不同。
生成的代码在 32 位和 32 位中具有完全不同的汇编构成。 64位代码,甚至与函数通信的协议也发生了变化。所以你不能使用32位编译器生成64位代码。
您可能想查看关于 Microsoft关于以 64 位目标为目标但使用 32 位开发机器的网站。
Programming in a 64-bit environment is quite different than 32-bit environment.
Code generated has totally different assembly constitution in 32 & 64-bit code, even the protocols of communicating with functions change. So you can't generate 64-bit code using 32-bit compiler.
You might want to see an article on Microsoft's web site about targeting a 64-bit target but using a 32-bit development machine.
正如 Jakob 所说:如果存在 MS VC++ x64 和 x86 运行时以及版本 10.0.40219 的可再发行版本,则无法安装 windows sdk 7.1。删除后win sdk安装就可以了,VS C++ SP1又可以正常安装了。
亲切的问候
As what Jakob said: windows sdk 7.1 cannot be installed if MS VC++ x64 and x86 runtimes and redisrtibutables of version 10.0.40219 are present. after removing them win sdk install is okay, VS C++ SP1 can be installed fine again.
Kind regards