cmake正在使用错误的cboost库

时间:2010-12-14 20:33:18

标签: boost cmake

我尝试用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}时,我就在正确的文件夹中。

任何人都可以帮助我吗?谢谢!

1 个答案:

答案 0 :(得分:0)

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

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