It is pretty simple actually. Hopefully you chose to install 64-bit compilers and linkers when you installed Visual Studio 2005 (x64 Compilers and Tools component for x64 and Itanium Compilers and Tools component for Itanium during custom install), open your solution and choose Build->Configuration Manager… from the main menu to get to the Configuration Manager dialog. You can also access the Configuration Manager screen by clicking on the Solution Platforms combo box in the menu bar (that shows Win32) and then choosing Configuration Manager… from the drop down or going via Project -> <Project>Properties –>Configuration Manger.
Once you are in the Configuration Manager dialog you can add a new platform to all configurations of the project by clicking on the Platform column and choosing <New…> from the dropdown.
Then you will get the New Project Platform dialog where you can choose x64 (aka AMD64) in the New Platform dropdown and choose to copy settings from Win32. You will perhaps have to tweak the project settings later for one reason or other but you are better off having most of the stuff like UNICODE, _UNICODE preprocessor definitions setup correctly in the new x64 configuration you are about to create.
You can also add a new platform to the solution by clicking on the Active solution platform combo dropdown and choosing <New…> there. This leads to New Solution Platform dialog which is very similar to the previous dialog.
Once you ok this, you will see x64 configuration in your project(s)/solution. If you do not see x64 in the drop down, try running the Visual Studio installer again and make sure the 64-bit tools are installed.
If this is a C++ project, remove WIN32 from your C++ preprocessor definitions.
The x64 configuration output directory [Project Properties->Configuration Properties->General->Output Directory] is set up by default as $(SolutionDir)$(PlatformName)\$(ConfigurationName) whereas Win32 sets output directory as $(SolutionDir)\$(ConfigurationName). $(PlatformName) is needed in 64-bit because there are two 64-bit platforms (amd64/x64 and ia64/Itanium) whereas in 32-bit we had just one (x86). If you wish, you can introduce $(PlatformName) into you Win32 configuration to keep your output directories consistent with their 64-bit counterparts. Otherwise your x64 output will be under x64\Debug or x64\Release sub-directory whereas Win32 output would be under Debug or Release.
If you want to compile for the IA64 (Itanium) platform, the process is exactly same as above. You just add platform corresponding to IA64 instead of x64.
To compile your solution via command line, you should use vcvarsall.bat <platform> to setup environment variables correctly so that tools for the target build platform are used. This batch file is in C:\Program Files\Microsoft Visual Studio 8\VC directory by default. That file looks like thus –
Notice all the possible platforms that can be passed to this batch file in the usage section of the file. Also note that if no platform is specified, vcvarsall.bat calls the vcvars32.bat (the batch file we all know and love from 32-bit world). On a 32-bit x86 machine, you can call vcvarsall x86_amd64 to cross-compile for x64 . Similarly to cross compile for Itanium IA64 you would call vcvarsall x86_ia64. If you are already running in amd64 and need to build binaries for x64 you would simply need to do vcvarsall amd64 or vcvarsall x64. Notice that there is no cross compilation possible for IA64 from x64/amd64.
After you execute the appropriate vcvarsall command in the command prompt, you can attempt building by typing something like “devenv <your-solution-to-build> /rebuild Debug /useenv” and devenv will automagically pick up the right compiler and linker for you.
Now good luck with those compiler and linker errors 🙂