<视觉SLAM十四讲>ch6 编译的问题 error: ‘ceres’ was not declared in this scope

关于ceres 和 g2o的安装,用了这篇,很顶很顺。

然后编译的时候就遇到问题:

[ 16%] Building CXX object CMakeFiles/g2oCurveFitting.dir/g2oCurveFitting.cpp.o
In file included from /usr/local/include/g2o/core/base_fixed_sized_edge.h:311,
                 from /usr/local/include/g2o/core/base_unary_edge.h:30,
                 from /home/xdhu/Downloads/slambook2-master/ch6/g2oCurveFitting.cpp:4:
/usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘void g2o::BaseFixedSizedEdge<D, E, VertexTypes>::linearizeOplusN():
/usr/local/include/g2o/core/base_fixed_sized_edge.hpp:174:41: error: ‘ceres’ was not declared in this scope
  174 |       VertexXnType<N>::Dimension == -1, ceres::internal::FixedArray<number_t>,
      |                                         ^~~~~
/usr/local/include/g2o/core/base_fixed_sized_edge.hpp:176:70: error: wrong number of template arguments (2, should be 3)
  176 |           number_t, static_cast<size_t>(VertexXnType<N>::Dimension)> >

你可能感兴趣的:(激光SLAM理论,linux)