Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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
like image 954
Abhishek Jain Avatar asked Dec 02 '14 09:12

Abhishek Jain


People also ask

What is x64 native tools command prompt?

x64 Native Tools Command Prompt - Sets the environment to use 64-bit, x64-native tools to build 64-bit, x64-native code. x86_x64 Cross Tools Command Prompt - Sets the environment to use 32-bit, x86-native tools to build 64-bit, x64-native code.

How do I open x64 native tools in CMD?

To access these command prompts on Windows, on the Start menu, open the folder for your version of Visual Studio, and then choose one of the x64 native or cross-tool developer command prompts.


1 Answers

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.

like image 171
Hans Passant Avatar answered Oct 19 '22 22:10

Hans Passant