Ceres-based optimization is often used in slam, but sometimes the eigen library is updated or the corresponding gcc version affects compilation, etc., and the eigen version does not match the ceres version. In fact, you only need to enter the corresponding file to change the dependencies. Of course, you need your own eigen version number in advance. Can refer to
Check out the OpenCV, Eigen, and Ceres versions in Ubuntu_Enjoy the cool~'s blog-CSDN blog_ceres versionhttps ://blog.csdn.net/AnChenliang_1002/article/details/110391085Then . to the following location
file:///usr/local/lib/cmake/Ceres/CeresConfig.cmake
Find out the version of the eigen library and modify it as follows
# Eigen.
# Flag set during configuration and build of Ceres.
# set(CERES_EIGEN_VERSION 3.3.7)
set(CERES_EIGEN_VERSION 3.4.0)