I installed Visual C++ on an Itanium machine and it installed as a 32-bit
application. I then downloaded the Microsoft Platform SDK for 64-bit
application development support. I expected the platform SDK to somehow
integrate inself into Visual C++ but it didn't. Currently, I can develop and
build 64-bit applications from the command line, but I don't know how to use
the Visual environment of Visual C++ to build 64-bit apps. I don't even see
where Visual C++ defines the compiler it uses. Anyone have any tips?
--Kim
Based on my experience and research, we are able to build 64 bits
Application with Visual C++ 6.0 IDE by the following steps:
1. Set the 64 bit build environment
In the Start menu, find Microsoft Platform SDK group. Choose Open Build
Environment Window and choose Set Windows XP 64 build environment debug.
That will open a console window with build environment set for 64 bits
build.
Or On a command window, change directory to ...\Microsoft SDK and run
SetEnv.bat /XP64
2. Start Visual C++ 6.0 with 64 bit builds environment
In the same command window, start Visual C++ 6.0 by running the following
command:
Msdev /useenv
This will start the VC6.0 IDE but with the include, library and executable
directories set for 64 bits build environment.
(If MSDEV.exe is not in the path, navigate to the …\Microsoft Visual
Studio\Common\msdev98\bin directory before running msdev).
3. Open the project from the VC6 folder.
4. Add a 64 bit debug configuration
(a) On the Build menu, choose Configurations.
(b) In the Configurations dialog, click Add button.
(c) In the Add Project Configuration dialog, set the Configuration to
Debug64 and set Copy Setttings from to <Project> - Win32 Debug.
(d) Click OK button and then Close button to add the configuration
5. Set the Active configuration to 64 bits
On the Build menu, choose Set Active Configuration to <Project> - Win32
Debug64 as the active configuration
6. Modify Project settings
There are a few Visual C++ 6.0 compiler / linker options which do not apply
to 64 bits compiler/linker. As such, they need to be modified to avoid
errors/warnings.
(a) In the Project Settings, choose the General tab and modify the
Intermediate files and Output files to Debug64.
(b) In the Project Settings, choose C/C++ tab. Set the Debug info to
Program Database (compiler option, /Zi).
(c) In the Project Settings, choose Link tab. In the Project options,
change "/machine:I386 " to "/machine:IA64".
(d) In the Workspace window from File View, highlight the <Project>.hpj
file and press the Del key to delete this file from the project (this file
may be removed already).
(e) From the Tools menu select Options. Under the Directories tab, select
Library Files from the Show directories for: drop down box. Add the path,
C:\Microsoft SDK\lib\IA64\mfc, if not listed. Otherwise, you will get
linker error LNK1104 on Mfc42d.lib.
7. Build the project
Now you have a 64 bits app, which is ready to be deployed to a IA64 machine.
Hope this helps!
Cheers,
HuangTM
This posting is provided "AS IS" with no warranties, and confers no rights.