How to: Enable a 64-Bit Visual C++ Toolset at the Command Line
Although not installed by default and not available in all editions (for more information, see Visual C++ Editions.), Visual C++ includes compilers that let you create applications that can run on a 64-bit Windows operating system.
See Visual Studio 64-bit Components for information on installing the 64-bit compilers.
For information on creating 64-bit applications inside the Visual Studio development environment, see How to: Configure Visual C++ Projects to Target 64-Bit Platforms.
The following list describes the various versions of cl.exe (the Visual C++ compiler):
When the 64-bit compilers are installed on a 64-bit Windows operating system, you will see command prompts for the various 64-bit native and cross compilers. To access these command prompts, go to Start and then All Programs. From the Microsoft Visual Studio 2008 menu option, select Visual Studio Tools and then a command prompt.
Any of the five compilers can be used from the command line by running the vcvarsall.bat batch file. By default, the full path for this file is C:\Program Files\Microsoft Visual Studio 9\VC\Vcvarsall.bat.
(Another way to enable the Visual C++ toolset is to use vcvars32.bat, but this only enables the 32-bit compiler. For more information, see Setting the Path and Environment Variables for Command-Line Builds.)
If no arguments are provided, this batch file configures the necessary environment variables for using the x86, 32-bit compiler, but it can be used to configure any of the 64-bit compilers. The following table shows the supported arguments for vcvarsall.bat.
Vcvarsall.bat argument | Compiler | Host (either natively or using emulation) | Target architecture |
|---|---|---|---|
"x86" (default) | 32-bit Native | x86, x64, Itanium | x86 |
"x86_amd64" | x64 Cross | X86, x64, Itanium | x64 |
"x86_IPF" | Itanium Cross | X86, x64, Itanium | Itanium |
"amd64" | x64 Native | x64 | x64 |
"IPF" or "itanium" | Itanium Native | Itanium | Itanium |