在 Visual Studio 2008 Express Edition (VS2008EE) 中配置 64 位编译

发布于 2024-09-12 18:11:06 字数 3481 浏览 4 评论 0 原文

我正在尝试在 Visual Studio 2008 Express Edition Service Pack 1(随后安装了一些相关的 Windows SDK)下,在 IDE 中和从命令行构建 64 位本机 C++ 应用程序。这是在 Windows XP Professional x64 Edition 版本 2003 Service Pack 2 计算机上。

我知道 Professional 版本可能提供真正的 VS IDE 集成,但我特别希望在 Visual Studio 2008 Express Edition 中做到这一点。

但是,我在 Visual Studio 2008 Express IDE 中的项目配置中遇到了一些麻烦,希望有人能够回答可能出现的问题。主要目标是能够从 IDE 本身构建 64 位本机应用程序,以及通过执行 vcvarsall.bat 等批处理文件从命令行或类似的批处理文件。

这是我到目前为止所尝试的:

我安装了 Visual Studio 2008 Express Edition SP1,已安装 某种类型的 SDK,但我相信不是包含 64 位编译器的正确 SDK(但当时并不知道)。

我构建了一个 hello world Win32 控制台应用程序,并查看了为可执行文件生成的清单文件。我在该清单文件中发现了“x86”,它不是 64 位 AFAICT,因此我做了更多研究。

我发现 Visual Studio 2008 中“缺少”什么Express 版本?。我看到了一些回复,其中之一是 缺失功能列表,其中“64 位 Visual C++ 工具”是缺失功能之一。

但是,在维基百科条目上,我们看到:

64 位编译器与 Visual C++ 2008 Express Edition 的真正集成是可能的,但仍然很麻烦。 9

因此,我尝试了其中的说明上面给出的 9 链接。该链接实际上指的是 如何:将 Visual C++ 项目配置为面向 64 位平台。我逐步完成了该页面上的步骤,但到达了他们指示您执行以下操作的地步:

单击“类型”或选择新平台下拉箭头,然后选择 64 位平台。

但下拉列表中没有任何条目。

我再次参考了维基百科上的 SDK 页面,特别是 64 位开发部分,其中指出:

最新发布的适用于 Windows Server 2008 和 .NET Framework 3.5 的 Windows SDK 包含更新的 x86、x64 和 Itanium (IA-64) Visual Studio 2008 编译器。

因此,在 Google/MSDN 上搜索“适用于 Windows Server 2008 和 .NET Framework 3.5 的 Windows SDK”后,我找到了 我要安装哪个 SDK? 页面。从该页面我看到 Microsoft Windows SDK for Windows 7 和 .NET Framework 3.5 Service Pack 1 于 2009 年 8 月发布,因为它是最新的。它的发行说明似乎暗示它至少包含 64 位编译器,但没有明确声明它修补了 Visual Studio IDE 以提供选择 x64 目标的方法,而这正是我所追求的。

我尝试了如何:配置 Visual C++ 项目以定位 64 位平台 再次指示,并得到相同的空下拉列表。

所以我当时认为编译器没有安装,所以我尝试执行 vcvarsall.bat amd64 命令,并遇到了 更多 VS2008 和 Windows SDK Server 2008 问题

即使我破解了 vcvarsall.bat 批处理文件以使命令行构建工作,IDE 是否仍然会因无法配置 Visual Studio 项目以使用 64 位编译器进行构建而“瘫痪” ?

谢谢!

背景

I am making an attempt at building 64-bit native C++ applications under Visual Studio 2008 Express Edition Service Pack 1 (with some relevant Windows SDK(s) installed afterwards), in the IDE and from the command line. This is on a Windows XP Professional x64 Edition Version 2003 Service Pack 2 machine.

I know that the Professional versions might provide true VS IDE integration, but I'm specifically looking to do this from within Visual Studio 2008 Express Edition.

But, I'm having a bit of trouble in the project configuration in the Visual Studio 2008 Express IDE, and am hoping someone can answer what might be the problem. The key goal is to be able to build 64-bit native apps from within the IDE itself, as well as from the command line by executing batch files like vcvarsall.bat or similar batch file.

Here is what I tried so far:

I installed Visual Studio 2008 Express Editions with SP1, which installed some type of SDK, but I believe not the right one containing 64-bit compilers (but didn't know it at the time).

I built a hello world Win32 Console app, and looked in the manifest file that was generated for the executable. I found "x86" in that manifest file, which is not 64-bit AFAICT, so I did more research.

I found What is “missing” in the Visual Studio 2008 Express Editions?. I saw some replies, one of which was has a list of missing features which has "64-bit Visual C++ Tools" as one of those missing features.

But, on the wikipedia entry we see:

True integration of 64bit compilers to the Visual C++ 2008 Express Edition is possible, but remains cumbersome. 9

So, I tried the instructions in that 9 link given above. That link actually refers to How to: Configure Visual C++ Projects to Target 64-Bit Platforms. I walked through the steps on that page, but got to the point where they instruct you to do the following:

Click the Type or select the new platform drop-down arrow, and then select a 64-bit platform.

But there are no entries in the drop down.

I referred again to the SDK page on Wikipedia, specifically the 64-bit development section, which states:

The most recently released Windows SDK for Windows Server 2008 and .NET Framework 3.5 contains the updated x86, x64 and Itanium (IA-64) Visual Studio 2008 compilers.

So Googling/MSDN'ing around a bit for "Windows SDK for Windows Server 2008 and .NET Framework 3.5" landed me at the Which SDK do I install? page. From that page I see Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 Service Pack 1 released on Aug-09 since it is the most recent one. Its release notes seemed to imply that it contained 64-bit compilers at least, but didn't explicitly state that it patched the Visual Studio IDE to provide a way to select x64 targets, and that is what I'm after.

I tried the How to: Configure Visual C++ Projects to Target 64-Bit Platforms instructions again, and got the same empty drop-down list.

So I thought then that the compilers aren't installed, so I tried executing the vcvarsall.bat amd64 command, and ran into the bug described at More VS2008 and Windows SDK Server 2008 problems.

Even if I hack the vcvarsall.bat batch file to get command-line builds working, will the IDE still be "crippled" by not being able to configure Visual Studio projects to build using the 64-bit compiler?

Thanks!

bg

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深巷少女 2024-09-19 18:11:06

短的!

适用于 Windows 7 和 .NET Framework 3.5 SP1 的 Windows SDK

http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and -64位目标/

Short!

Windows SDK for Windows 7 and .NET Framework 3.5 SP1

AND

http://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文