VINS-Mono学习记录

  • 1 .CMake Unable to find the requested Boost libraries.

CMake Error at /opt/cmake-3.9.1/share/cmake-3.9/Modules/FindBoost.cmake:1879 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.58.0

  Boost include path: /usr/include

  Could not find the following Boost libraries:

          boost_program_options

  Some (but not all) of the required Boost libraries were found.  You may
  need to install these additional Boost libraries.  Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.
Call Stack (most recent call first):
  VINS-Mono/camera_model/CMakeLists.txt:16 (find_package)


-- Found installed version of Eigen: /usr/lib/cmake/eigen3
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations]
-- +++ processing catkin package: 'ar_demo'
-- ==> add_subdirectory(VINS-Mono/ar_demo)
-- +++ processing catkin package: 'feature_tracker'
-- ==> add_subdirectory(VINS-Mono/feature_tracker)
-- +++ processing catkin package: 'pose_graph'
-- ==> add_subdirectory(VINS-Mono/pose_graph)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Found installed version of Eigen: /usr/lib/cmake/eigen3
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations]
-- +++ processing catkin package: 'vins_estimator'
-- ==> add_subdirectory(VINS-Mono/vins_estimator)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Found installed version of Eigen: /usr/lib/cmake/eigen3
-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found required Ceres dependency: gflags
-- Found Ceres version: 2.0.0 installed in: /usr/local with components: [EigenSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations]
-- Configuring incomplete, errors occurred!
See also "/home/sun/VINS-Mono/build/CMakeFiles/CMakeOutput.log".
See also "/home/sun/VINS-Mono/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

解决办法:

修改CMakeLIsts:如下

#find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
#include_directories(${Boost_INCLUDE_DIRS})

FIND_PACKAGE(Boost)
IF (Boost_FOUND)
    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
    ADD_DEFINITIONS( "-DHAS_BOOST" )
ENDIF()

参考资料:

【1】https://stackoverflow.com/questions/3808775/cmake-doesnt-find-boost

【2】http://www.it1352.com/323838.html

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大江东去浪淘尽千古风流人物

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值