/usr/bin/ld: cannot find -lBoost::timer
collect2: error: ld returned 1 exit status
SC-A-LOAM-main/CMakeFiles/alaserPGO.dir/build.make:458: recipe for target '/home/y/ros_ws/aloam_sc/devel/lib/aloam_velodyne/alaserPGO' failed
make[2]: *** [/home/y/ros_ws/aloam_sc/devel/lib/aloam_velodyne/alaserPGO] Error 1
CMakeFiles/Makefile2:1436: recipe for target 'SC-A-LOAM-main/CMakeFiles/alaserPGO.dir/all' failed
make[1]: *** [SC-A-LOAM-main/CMakeFiles/alaserPGO.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
在安装SC Aloam,装了GTSAM后开始编译,然俄问题出现了。
解决方案:在CMake里增加搜索timer的这一行
find_package(PCL REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Ceres REQUIRED)
#添加如下
find_package(Boost REQUIRED timer)
find_package(OpenMP REQUIRED)
find_package(GTSAM REQUIRED QUIET)
然后OK了