Ceres: fatal error: ceres/ceres.h: No such file or directory

Share:

fatal error: ceres/ceres.h: No such file or directory

/home/yubao/data/project/slambook2/bundle_adjustment/bundle_adjustment_ceres.cpp:2:10: fatal error: ceres/ceres.h: No such file or directory
 #include <ceres ceres.h="">
          ^~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/bundle_adjustment_ceres.dir/build.make:62: recipe for target 'CMakeFiles/bundle_adjustment_ceres.dir/bundle_adjustment_ceres.cpp.o' failed
make[2]: *** [CMakeFiles/bundle_adjustment_ceres.dir/bundle_adjustment_ceres.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/bundle_adjustment_ceres.dir/all' failed
make[1]: *** [CMakeFiles/bundle_adjustment_ceres.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Solution

find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})

Post a Comment