G2O: fatal error: g2o/core/base_vertex.h: No such file or directory

Share:
## fatal error: g2o/core/base_vertex.h: No such file or directory ```sh /home/yubao/data/project/slambook2/bundle_adjustment/bundle_adjustment_g2o.cpp:1:10: fatal error: g2o/core/base_vertex.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/bundle_adjustment_g2o.dir/build.make:62: recipe for target 'CMakeFiles/bundle_adjustment_g2o.dir/bundle_adjustment_g2o.cpp.o' failed make[2]: *** [CMakeFiles/bundle_adjustment_g2o.dir/bundle_adjustment_g2o.cpp.o] Error 1 CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/bundle_adjustment_g2o.dir/all' failed make[1]: *** [CMakeFiles/bundle_adjustment_g2o.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 ``` ## Solution ```sh # G2O find_package( G2O REQUIRED ) include_directories( ${G2O_INCLUDE_DIR} ) message("g2o include dirs: " ${G2O_INCLUDE_DIR}) ``` yubao_blog_cover

No comments