如何构建针对64位环境的解决方案?

时间:2022-05-08 23:52:56

Is there anyway to build a solution to target 64 bit environment in vs2003? My solution is native c++ not visual c++. Any help would be greatly appreciated.

反正有没有在vs2003中构建针对64位环境的解决方案?我的解决方案是原生c ++而不是visual c ++。任何帮助将不胜感激。

cheers,

RWendi

3 个解决方案

#1


4  

This page on 2003's lack of 64-bit targeting seems to address your issue: http://www.toymaker.info/Games/html/64_bit.html.

这个关于2003年缺乏64位定位的页面似乎解决了您的问题:http://www.toymaker.info/Games/html/64_bit.html。

The first step was to set up my development environment for 64 bit development. I use Visual Studio 2003 which has little built in support for 64 bit development.

第一步是为64位开发设置我的开发环境。我使用的Visual Studio 2003几乎没有内置支持64位开发。

In order to create 64 bit applications you need to install the latest Platform SDK from Microsoft (Microsoft Platform SDK for Windows Server 2003). The SDK, as well as having libraries for 32 bit programming, has 64 bit versions for AMD64 and IA64 (Intel) development.

要创建64位应用程序,您需要安装Microsoft的最新Platform SDK(适用于Windows Server 2003的Microsoft Platform SDK)。 SDK以及具有32位编程的库,具有用于AMD64和IA64(Intel)开发的64位版本。

Getting the correct library and header file paths set up in Visual Studio proved surprisingly difficult. I wanted the choice of developing 32 bit or 64 bit projects. While the platform SDK comes with command files to set up the correct paths they wipe out any other paths. Since T2 uses DirectX I also needed the DirectX paths setting correctly.

在Visual Studio中设置正确的库和头文件路径证明非常困难。我想选择开发32位或64位项目。虽然平台SDK带有命令文件来设置正确的路径,但它们会消除任何其他路径。由于T2使用DirectX,我还需要正确设置DirectX路径。

Upgrading to a newer edition of Visual Studio looks like the safer, non-hackish solution, if possible.

如果可能的话,升级到更新版本的Visual Studio看起来就像更安全,非hackish的解决方案。

#2


1  

As Warren points out, this isn't easy with VS2003. You need to install the x64 compiler from the platform SDK.

正如沃伦所指出的,VS2003并不容易。您需要从平台SDK安装x64编译器。

We ran this way for a couple of years (starting with even earlier versions and the IA64 compiler). There were separate project configurations for X64 builds, so in addition to the normal DEBUG and RELEASE configurations we had DEBUG_X64 and RELEASE_X64.

我们用这种方式运行了几年(从早期版本和IA64编译器开始)。 X64版本有单独的项目配置,因此除了正常的DEBUG和RELEASE配置外,我们还有DEBUG_X64和RELEASE_X64。

But you have to launch VS studio with the paths set up for either the x86 or x64 compilers & libraries. You couldn't switch between them on the fly. I believe there was a command line switch /useenv that told VS to set its various paths from environment variables. We had bat files to set this all up.

但是你必须使用为x86或x64编译器和库设置的路径启动VS studio。你无法在飞行中切换它们。我相信有一个命令行开关/ useenv告诉VS从环境变量设置其各种路径。我们有蝙蝠文件来设置这一切。

It is messy, and every now and then we'd build the wrong project configuration for the environment which always took a while to sort out. You are much better off upgrading to VS2005/VS2008 where the target architecture is exposed directly in the GUI.

它很混乱,我们时不时地为环境构建错误的项目配置,这总是花费一些时间来整理。升级到VS2005 / VS2008会更好,目标架构直接在GUI中公开。

#3


0  

Sounds like a viable solution... going to try it before accepting the answer. votes up!

听起来像一个可行的解决方案......在接受答案之前尝试一下。投票!

RWendi

#1


4  

This page on 2003's lack of 64-bit targeting seems to address your issue: http://www.toymaker.info/Games/html/64_bit.html.

这个关于2003年缺乏64位定位的页面似乎解决了您的问题:http://www.toymaker.info/Games/html/64_bit.html。

The first step was to set up my development environment for 64 bit development. I use Visual Studio 2003 which has little built in support for 64 bit development.

第一步是为64位开发设置我的开发环境。我使用的Visual Studio 2003几乎没有内置支持64位开发。

In order to create 64 bit applications you need to install the latest Platform SDK from Microsoft (Microsoft Platform SDK for Windows Server 2003). The SDK, as well as having libraries for 32 bit programming, has 64 bit versions for AMD64 and IA64 (Intel) development.

要创建64位应用程序,您需要安装Microsoft的最新Platform SDK(适用于Windows Server 2003的Microsoft Platform SDK)。 SDK以及具有32位编程的库,具有用于AMD64和IA64(Intel)开发的64位版本。

Getting the correct library and header file paths set up in Visual Studio proved surprisingly difficult. I wanted the choice of developing 32 bit or 64 bit projects. While the platform SDK comes with command files to set up the correct paths they wipe out any other paths. Since T2 uses DirectX I also needed the DirectX paths setting correctly.

在Visual Studio中设置正确的库和头文件路径证明非常困难。我想选择开发32位或64位项目。虽然平台SDK带有命令文件来设置正确的路径,但它们会消除任何其他路径。由于T2使用DirectX,我还需要正确设置DirectX路径。

Upgrading to a newer edition of Visual Studio looks like the safer, non-hackish solution, if possible.

如果可能的话,升级到更新版本的Visual Studio看起来就像更安全,非hackish的解决方案。

#2


1  

As Warren points out, this isn't easy with VS2003. You need to install the x64 compiler from the platform SDK.

正如沃伦所指出的,VS2003并不容易。您需要从平台SDK安装x64编译器。

We ran this way for a couple of years (starting with even earlier versions and the IA64 compiler). There were separate project configurations for X64 builds, so in addition to the normal DEBUG and RELEASE configurations we had DEBUG_X64 and RELEASE_X64.

我们用这种方式运行了几年(从早期版本和IA64编译器开始)。 X64版本有单独的项目配置,因此除了正常的DEBUG和RELEASE配置外,我们还有DEBUG_X64和RELEASE_X64。

But you have to launch VS studio with the paths set up for either the x86 or x64 compilers & libraries. You couldn't switch between them on the fly. I believe there was a command line switch /useenv that told VS to set its various paths from environment variables. We had bat files to set this all up.

但是你必须使用为x86或x64编译器和库设置的路径启动VS studio。你无法在飞行中切换它们。我相信有一个命令行开关/ useenv告诉VS从环境变量设置其各种路径。我们有蝙蝠文件来设置这一切。

It is messy, and every now and then we'd build the wrong project configuration for the environment which always took a while to sort out. You are much better off upgrading to VS2005/VS2008 where the target architecture is exposed directly in the GUI.

它很混乱,我们时不时地为环境构建错误的项目配置,这总是花费一些时间来整理。升级到VS2005 / VS2008会更好,目标架构直接在GUI中公开。

#3


0  

Sounds like a viable solution... going to try it before accepting the answer. votes up!

听起来像一个可行的解决方案......在接受答案之前尝试一下。投票!

RWendi