已安装VS2019,以hello.c为例,编译步骤如下:
#include <stdio.h>
int main(int argc, char* argv[]){
printf("hello world ...\n");
return 0;
}
- 打开 x64 Native Tools Command Prompt for VS 2019 Preview("开始"->"Visual Studio 2019"->"Visual Studio 2019"->"VC"->"x64 Native Tools Command Prompt for VS 2019 Preview"),进入"hello.c"所在目录。
- 执行 cl hello.c 即可。
- 关于 cl 编译器的详细用法,可以执行 cl /? 来查看。
网友评论