views:

871

answers:

3

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

+3  A: 

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.

warren
This seems to work partially. Yes, its using the 64 bit compiler, but somehow the 64 bit compiler in the platform sdk has some missing external dependencies. Going to try the windows sdk and see if it works.
RWendi
A: 

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.

Rob Walker
A: 

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

RWendi

RWendi