views:

172

answers:

3

I have a 32-bit ATL C++ in-proc COM server soultion. How do I port it to 64-bit Windows? I mean how do I make VC++7 emit 64-bit code? Is it possible with Visual Studio 2003?

+1  A: 

64 bits support is new with VS 2005, aka VC++8

MSalters
+2  A: 

You need a 64bit compiler that will compile long to a 64bit long. The version which was shipped in VS2005 would do. Later versions of Visual C++ and Windows SDK have higher versions of the compiler. 64bit support is disabled in standard or lower versions of Visual C++ but not in the freely available Windows SDK. Other compiler providers like Intel have their own products that supports Visual Studio and 64 bit.

Sheng Jiang 蒋晟
Does it mean I can use the compiler from Windows SDK for that?
sharptooth
Yes, and the compiler in WDK will do too. Note some switches may be deprecated in new versions of compilers so you may need to tweak the compiler configuration
Sheng Jiang 蒋晟
I considered all options and decided that I will just compile the project on the build server that has VS2k8 installed and copy the result from there. It will be less of pain and we plan to move all projects there in several months anyway.
sharptooth
+1  A: 

Have a look at VSItanium . From the description:

The VSItanium plugin for Visual Studio .NET 2003 allows to compile Win32 Visual C++ projects with several external compilers, actually the Microsoft SDK 64bit Itanium and AMD Opteron compiler as well as the Intel C++ Itanium compiler.

Concerning compiler choice -- if migrating to a newer VS version is not an option because of reliance on cl 13 (VS 2005 uses cl 14), you should be able to find a cl 13 supporting IA-64 and amd64 in WDK 3790.1830, IIRC. There should be an old SDK with a 64 bit-supporting cl 13, but I do not know which one.

If your project builds fine with newer compilers, you basically have free choice of WDK and SDK versions.

Johannes Passing