Skip to content

C 语言环境配置

Windows 使用 Tiny C Compiler

在官网下载 tcc-0.9.27-win64-bin.zip,解压之后配置环境变量即可使用,官网有使用文档 基础命令:

bash
# 生成可执行文件
tcc demo.c

# 编译并运行且不生成对应文件:
tcc -run demo.c

Mac 下自带了 clang 编译器

bash
# 生成可执行文件
cc test.c -o test
# 或者
clang test.c -o test

# 生成可执行文件并直接运行
cc test.c -o test; open test
Release time: 7/22/2022, 6:52:00

Last updated:

⟣ Growing, with you. ⟢