Windows 安装配置 LLVM(Clang)

222233333

本文以二进制安装部署为例

1.下载LLVM二进制文件

https://github.com/llvm/llvm-project/releases
2222

注意:如果本机没有安装Visual Studio且不打算安装,建议使用llvm-mingw
https://github.com/mstorsjo/llvm-mingw/releases

运行时库 (CRT) 选择:

  • ucrt (推荐):针对现代 Windows(Windows 10/11)。它是微软最新的标准,对 C 标准的兼容性更好。

  • msvcrt:针对老版本 Windows 或需要极高兼容性的场合。

2.配置环境变量

  • LIBCLANG_PATH -> D:\Developer\Clang\bin
  • Path -> %LIBCLANG_PATH%
posted @ 2026-04-23 18:50  SpringCore  阅读(8)  评论(0)    收藏  举报