What is the difference between x64 Native Tools Command Prompt and x64 Cross Tools Command Prompt?

Abhishek Jain picture Abhishek Jain · Dec 2, 2014 · Viewed 9.5k times · Source

I have installed 32 bit Visual Studio 2013 on my 64 bit Windows 8.1. I have 5 command prompts:

  1. Developer Command Prompt for VS2013
  2. VS2013 ARM Cross Tools Command Prompt
  3. VS2013 x64 Cross Tools Command Prompt
  4. VS2013 x64 Native Tools Command Prompt
  5. VS2013 x86 Native Tools Command Prompt

I do not understand the difference between:

  1. Developer Command Prompt for VS2013 Versus VS2013 x86 Native Tools Command Prompt
  2. VS2013 x64 Cross Tools Command Prompt Versus VS2013 x64 Native Tools Command Prompt

Answer

Hans Passant picture Hans Passant · Dec 2, 2014

A cross compiler is a compiler that executes on one platform but generates code for another. Your machine has two compilers that can generate x64 code. One is the 32-bit cross compiler in the vc/bin/amd64_x86 directory, the other is a 64-bit native compiler in the vc/bin/amd64 directory. They both generate the exact same x64 machine code.

You only must use the cross compiler when you have a 32-bit operating system. Debugging and testing the program it generates is unpleasant, you need another machine and use the remote debugger. Okay for a build server, perhaps. If you have the 64-bit version of Windows then either choice is fine, but you favor the "x64 Native" selection. The compiler and linker are slightly faster and can tackle much bigger programs.

This also explains why you only have the cross compiler selection for ARM, you don't have an ARM processor in your dev machine.