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

后端 未结 1 1896
故里飘歌
故里飘歌 2021-02-01 17:27

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 C
1条回答
  •  醉梦人生
    2021-02-01 18:00

    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.

    0 讨论(0)
提交回复
热议问题