我尝试用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}
时,我就在正确的文件夹中。
任何人都可以帮助我吗?谢谢!
答案 0 :(得分:0)
尝试删除构建树,然后运行:
cmake -DBOOST_ROOT=/home/dev/boost_1_45_0 path/to/src path/to/build