arm-none-eabi-g++ 找不到 stdc++ 标头
arm-none-eabi-g++ can't find stdc++ headers
每当使用包含 stdlib 标头的 arm-none-eabi
(-g++
、-gcc
和 -c++
)构建C++源时,gcc 都会说找不到该文件:
测试.cpp:
#include <set>
#include <cmath>
using namespace std;
int main()
{
set<int> aSet();
aSet.insert(abs(-1));
return 0;
}
输出:
test.cpp:1:15: fatal error: set: No such file or directory
#include <set>
^
compilation terminated.
系统信息:
乌班图15.10
GCC 版本 4.9.3 20150529(预发行版)
GCC 正在寻找 4.9.3 版本的文件,但 newlib 安装具有 4.9 版本的库。将/usr/include/newlib/4.9
符号链接到/usr/include/newlib/4.9.3
可以解决此问题。
感谢 Alex Hoppus 帮助我进行调试
相关文章:
- g++ 说函数不存在,即使包含正确的标头
- spdlog标头仅与外部fmt一起使用.spdlog错误:'内部':不是'fmt'
- 在CMake中使用find_package时,是否会显式包含标头
- 错误"Could not find Boost"(缺少:上下文标头)
- 如何在标头中声明(或定义)函数的问题
- 如何避免在仅标头库中C++类/变量重定义
- C++算法标头中,为什么要使用 "!(val < *first)" ?
- C++标头错误 C2238 意外标记";"
- std::initializer_list,大括号初始化和标头
- 在 c++ 中拆分类和标头中的继承,错误
- 如何确定哪个标头调用 c++ 中的另一个标头
- 如何在生成文件中添加多个标头 (HDR) 和对象?
- 我可以在运行时重新定义在 OpenCascade/OCCT 标头中定义的 c++ 静态常量吗?
- GCC,CMake,预编译标头和维护依赖项
- VisualStudio:使用 Suse Enterprise Server 12 SP5 时,不会下载远程库标头
- 一个标头库中的错误
- 可视化 Bazel C++预编译标头实现
- 如何在 CMake 中添加预编译标头用于 Visual Studio 生成器
- 使用 GN 构建预编译标头
- arm-none-eabi-g++ 找不到 stdc++ 标头