编译器的选择(x86_amd64, amd64等的区别)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/WL2002200/article/details/52984241

结论

  • 32/64 位系统编译在32位系统上运行 => x86
  • 32 系统上编译64位系统上运行 => x86_amd64
  • 64 系统上编译在64位系统上运行 => amd64

解释

注:以下引自MSDN
The following list describes the various versions of cl.exe (the Visual C++ compiler):

x86 on x86

Allows you to create output files for x86 machines. This version of cl.exe runs as a 32-bit process, native on an x86 machine and under WOW64 on a 64-bit Widows operating system.
Itanium on x86 (Itanium cross-compiler)
Allows you to create output files for Itanium. This version of cl.exe runs as a 32-bit process, native on an x86 machine and under WOW64 on a 64-bit Widows operating system.

x64 on x86 (x64 cross-compiler)

Allows you to create output files for x64. This version of cl.exe runs as a 32-bit process, native on an x86 machine and under WOW64 on a 64-bit Widows operating system.

Itanium on Itanium

Allows you to create output files for Itanium. This version of cl.exe runs as a native process on an Itanium machine.

x64 on x64

Allows you to create output files for x64. This version of cl.exe runs as a native process on an x64 machine.

Vcvarsall.bat argument Compiler Host (either natively or using emulation) Target architecture
“x86” (default) 32-bit Native x86, x64, Itanium x86
“x86_amd64” x64 Cross X86, x64, Itanium x64
“x86_IPF” Itanium Cross X86, x64, Itanium Itanium
“amd64” x64 Native x64 x64
“IPF” or “itanium” Itanium Native Itanium Itanium
阅读更多
换一批

没有更多推荐了,返回首页