如何编译64 code,在命令行的Visual Studio? [英] How to compile x64 code with Visual Studio in command line?

查看:224
本文介绍了如何编译64 code,在命令行的Visual Studio?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Windows命令行编译一个简单的Hello世界风格的节目。

I want to compile a simple hello-world-style program using the Windows command line.

cl file_name.c

是很容易的。现在,我想要做同样的事情在64位。我该怎么办?

is easy enough. Now I want to do the same thing in 64 Bit. What should I do?

推荐答案

您需要使用一个版本的编译器的cl.exe发射64 code的。哪一个取决于你的设置了一下。

You need to use a version of the cl.exe compiler which emits x64 code. Which one depends a bit on your setup.

让我们看看你是一个64位计算机上的情况。对于这一点,你需要使用哪个住在

Let's consider the case you're on a 64 bit machine. For this you'll need to use the compiler which lives at

C:\ Program Files文件(x86)的\微软的Visual Studio 10.0 \ VC \ BIN \ AMD64 \ cl.exe时

c:\Program Files (x86)\Microsoft visual Studio 10.0\VC\bin\amd64\cl.exe

如果你是一个32位的机器上,您需要使用位于

If you're on a 32 bit machine you'll need to use the cross compiler located at

C:\ Program Files文件\微软的Visual Studio 10.0 \ VC \ BIN \ x86_amd64 \ cl.exe时

c:\Program Files\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\cl.exe

这篇关于如何编译64 code,在命令行的Visual Studio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆