【问题标题】:cmake is using the wrong cboost libscmake 使用了错误的 cboost 库
【发布时间】:2010-12-14 20:33:18
【问题描述】:

我尝试用 cmake 编译一个程序,但我收到了这个错误:

  Unable to find the requested Boost libraries.

  Boost version: 1.34.1

  Boost include path: /usr/include

  Detected version of Boost is too old.  Requested version was 1.37 (or
  newer).

  The following Boost libraries could not be found:

          boost_program_options
          boost_filesystem

  No Boost libraries were found.  You may need to set Boost_LIBRARYDIR to the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.

我已经在 /home/dev/boost_1_45_0 下安装了新的 boost 包。

但是当我再次尝试运行 cmake 时,我仍然会遇到同样的错误。

我也设置了

export BOOST_ROOT=/home/dev/boost_1_45_0

但是当我执行cd ${BOOST_ROOT} 时,我在正确的文件夹中。

有人可以帮我吗?谢谢!

【问题讨论】:

    标签: boost cmake


    【解决方案1】:

    尝试删除你的构建树,然后运行:

    cmake -DBOOST_ROOT=/home/dev/boost_1_45_0 path/to/src path/to/build
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-11
      相关资源
      最近更新 更多