Native and Cross Compilers

When you develop 32-bit applications on a 32-bit system, you are working in a native development environment. This means that the development system is the same as the target system. In some cases, however, you may need to build 64-bit applications while working on a 32-bit version of Windows. For such purposes, you need a cross compiler.

In addition to the 32-bit compiler, Visual C++ provides two X64 compilers: a native compiler that runs on 64-bit Windows, and a cross compiler that builds 64-bit applications on 32-bit Windows.

The following table shows the three compiler executable files and their vcvars*.bat setup batch files as installed on a 32-bit system.

  Compiler and setup batch file (all paths under C:\Program Files\Microsoft Visual Studio <release>\VC\bin\)
32-bit compiler cl.exe
vcvars32.bat
64-bit native compiler amd64\cl.exe
amd64\vcvarsamd64.bat
64-bit cross compiler x86_amd64\cl.exe
x86_amd64\vcvarsx86_amd64.bat
Note: Though Visual Studio installs the native 64-bit compiler on 32-bit systems, the 64-bit compiler can be used only on 64-bit platforms.