【问题标题】:compile boost 1.51.0 on centos6.0 final 64bit在 centos6.0 final 64bit 上编译 boost 1.51.0
【发布时间】:2012-10-19 03:29:59
【问题描述】:

我在 centos6.0 final 64bit(g++ 4.4) 上编译了 boost 1.51.0。编译时没有错误。但是,当我尝试将 libboost_thread.a 链接到我的程序时,出现链接错误说 undefined reference toboost::thread::~thread()'`。 我尝试 nm 列出 libboost_thread.a 的符号,但没有任何名为 ~thread 的符号。

我在 ubuntu12.04 32bit(g++ 4.6) 上做了同样的事情,它运行良好并且成功链接,没有任何错误。

有人知道这个问题吗?

我用boost1.49.0代替boost1.51.0,一切顺利。所以我猜在 g++ 4.4 和 boost1.51.0 中可能存在一些兼容问题

【问题讨论】:

    标签: g++ 64-bit centos boost-thread


    【解决方案1】:

    boost::thread::~thread() 函数已在 1.51 中内联。我的猜测是您正在使用 1.49 进行编译并与 1.51 进行链接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-17
      • 2017-06-17
      • 1970-01-01
      相关资源
      最近更新 更多