How to build a solution to target 64 bit environment? [closed]

和自甴很熟 提交于 2019-12-23 10:53:45

问题


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.

cheers,

RWendi


回答1:


This page on 2003's lack of 64-bit targeting seems to address your issue: 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.

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.

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.

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




回答2:


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

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.

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.

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.




回答3:


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

RWendi



来源:https://stackoverflow.com/questions/181213/how-to-build-a-solution-to-target-64-bit-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!