How to compile x64 code with Visual Studio in comm

2019-02-02 00:27发布

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

cl file_name.c

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

7条回答
Bombasti
2楼-- · 2019-02-02 00:50

You can also use the batch file "Vcvarsall.bat" (By default, the full path for this file is C:\Program Files\Microsoft Visual Studio 8\VC\Vcvarsall.bat for VS2005).

If no arguments are provided, this batch file configures the necessary environment variables for using the x86 32-bit compiler. But it can be used to configure any of the 64-bit compilers, for example to use the native 64-bit compiler pass "amd64" as argument. Then just run cl.exe.

查看更多
登录 后发表回答