26

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
Smart Manoj
  • 5,230
  • 4
  • 34
  • 59
Abhishek Jain
  • 9,614
  • 5
  • 26
  • 40

1 Answers1

21

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.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Ok, so VS2013 x64 Cross Tools Command Prompt is a 32 bit compiler? which can create native 64 bit programs. – Abhishek Jain Dec 03 '14 at 04:59
  • 1
    So, I have two options, and I could use a little clarification. With VS2015, I have x64 x86 Cross Tools, and x86 x64 Cross tools. Which one do I use to compile 32 bit code on a 64 bit machine? – kayleeFrye_onDeck Sep 24 '15 at 18:45
  • 1
    There is only one compiler that generates x86 code, stored in vc/bin. Not a cross compiler, it runs fine on a 64-bit OS thanks to the wow64 emulator. – Hans Passant Apr 24 '17 at 19:27