2026-08-28 19:59:52 +08:00
|
|
|
# cKit
|
|
|
|
|
|
2026-08-29 00:53:40 +08:00
|
|
|
C Development Kit
|
|
|
|
|
|
|
|
|
|
# 安装 MSYS2 UCRT64 环境
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
# 1. 安装基础工具链(GCC 编译器、GDB 调试器等)
|
|
|
|
|
pacman -S --needed mingw-w64-ucrt-x86_64-toolchain
|
|
|
|
|
|
|
|
|
|
# 2. 安装现代构建工具 Ninja(性能远超传统的 make)
|
|
|
|
|
pacman -S --needed mingw-w64-ucrt-x86_64-ninja
|
|
|
|
|
|
|
|
|
|
# 3. 安装 CMake(作为 IDE 备用或终端独立调用)
|
|
|
|
|
pacman -S --needed mingw-w64-ucrt-x86_64-cmake
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# 构建
|
|
|
|
|
```shell
|
|
|
|
|
# 以 UCRT64 预设进行配置
|
|
|
|
|
cmake --preset msys2-ucrt64
|
|
|
|
|
|
|
|
|
|
# 一键编译
|
|
|
|
|
cmake --build --preset build-windows-mingw
|
|
|
|
|
```
|