c++ - 编译时对 boost::system::system_category() 的 undefined reference

标签 c++ boost

我正在尝试在 Ubuntu 11.10 上编译一个使用 Boost 库的程序。我安装了 Ubuntu 存储库中的 1.46-dev Boost 库,但在编译程序时出现错误。

对 boost::system::system_category() 的 undefined reference

我做错了什么?

最佳答案

您使用的 boost 库取决于 boost_system 库。 (并非所有人都这样做。)

假设您使用 gcc,请尝试将 -lboost_system 添加到您的编译器命令行以链接到该库。

关于c++ - 编译时对 boost::system::system_category() 的 undefined reference ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9723793/

相关文章:

c++ - 在 Vector 上 push_back 时设置精度

c++ - 使用版本 2 语法的良好/完整 Boot Spirit 示例

c++ - 如何在 C++ 中制作 tensorflow oneHot?

c++ - ICU 的 BreakIterator 文档不正确?

c++ - move 构造函数和 `std::array`

c++ - 为 Windows CE 编译 Boost 1.47

c++ - 带有 boost 1.50 : warning C4267 的 Visual Studio C++ 2005/2010

c++ - 努力创建包含 std::bitset 的 Boost-Bimap

c++ - 更改零矩阵中的像素无法正常工作

c++ - 带有关键字 this 的构造函数中的段错误