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

结论

  • 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 argumentCompilerHost (either natively or using emulation)Target architecture
“x86” (default)32-bit Nativex86, x64, Itaniumx86
“x86_amd64”x64 CrossX86, x64, Itaniumx64
“x86_IPF”Itanium CrossX86, x64, ItaniumItanium
“amd64”x64 Nativex64x64
“IPF” or “itanium”Itanium NativeItaniumItanium
  • 9
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值