clang/clang++ 未检测标准 header 文件,例如 iostream.h 和 stdio.h
clang/clang++ not detecting standard header files like iostream.h and stdio.h
我 运行 clang++ -v testfile.cpp
发现目录 C:\LLVM\lib\clang.9.0\include
中缺少许多标准 headers。我从 this link.
下载了一个 pre-built 32 位 windows 的 clang 3.9.0 二进制文件
有人可以帮我解决这个问题并解释为什么 pre-build 版本的 clang 中缺少标准库吗?我已经在网上搜索了几个小时以获取此问题的答案和解决方案,但找不到。提前致谢。
why the standard libraries are missing in the pre-build version of clang?
您的 Windows 二进制下载仅包含二进制构建工具
加上一把 clang-specific headers 因为你应该
在 Windows 上使用 clang 代替另一个提供您的本机编译器
标准库。同样,如果您在 Linux 上安装 clang,您将针对
默认为 GCC 标准库。
您的互联网搜索似乎未能将您引导至 Installing clang++ to compile and link on Windows,这
解释了如何将 clang 与 mingw-w64 GCC 标准库集成以用于 32- and/or 64 位工作
以 clang for Windows 期望和支持的方式。
我 运行 clang++ -v testfile.cpp
发现目录 C:\LLVM\lib\clang.9.0\include
中缺少许多标准 headers。我从 this link.
有人可以帮我解决这个问题并解释为什么 pre-build 版本的 clang 中缺少标准库吗?我已经在网上搜索了几个小时以获取此问题的答案和解决方案,但找不到。提前致谢。
why the standard libraries are missing in the pre-build version of clang?
您的 Windows 二进制下载仅包含二进制构建工具 加上一把 clang-specific headers 因为你应该 在 Windows 上使用 clang 代替另一个提供您的本机编译器 标准库。同样,如果您在 Linux 上安装 clang,您将针对 默认为 GCC 标准库。
您的互联网搜索似乎未能将您引导至 Installing clang++ to compile and link on Windows,这 解释了如何将 clang 与 mingw-w64 GCC 标准库集成以用于 32- and/or 64 位工作 以 clang for Windows 期望和支持的方式。