C环境安装
安装
- 下载和安装 Clang
下载地址:http://releases.llvm.org/download.html
选择 Pre-Built Binaries: Windows (64-bit) (.sig)
安装,默认安装路径 C:\Program Files\LLVM - 下载和安装 MinGW
下载地址:https://sourceforge.net/projects/mingw-w64/files/
选择 x86_64-posix-seh
解压, - 合并文件
将解压的 x86_64-posix-seh 的内容覆盖 到 C:\Program Files\LLVM
-测试安装是否成功
cmd 下输入 clang -v 和gcc -v
clang -v
clang version 9.0.0 (tags/RELEASE_900/final)
gcc -v
gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
- 安装 Visual Studio Code 软件(具体问度娘)并安装C插件:C/C++ for Visual Studio Code
hello world
# include <stdio.h>
# include <stdlib.h>
int main(){
printf("hello world");
system("pause");
}
gcc hello.c -o hello
start hello.exe