【SLAM编译错误】CMakeFiles/Makefile2:252: recipe for target 'CMakeFiles/stereo_kitti.dir/all' failed

类型转换错误

错误关键词:

recipe

错误提示比如:

make[2]: *** [CMakeFiles/stereo_kitti.dir/Examples/Stereo/stereo_kitti.cc.o] Error 1
[ 93%] Linking CXX executable ../Examples/Stereo/stereo_euroc
CMakeFiles/Makefile2:252: recipe for target 'CMakeFiles/stereo_kitti.dir/all' failed

 

错误解决办法:

打开Thirdparty/g2o/g2o/solvers/linear_solver_eigen.h,将以下代码
template
class LinearSolverEigen: public LinearSolver
{
public:
typedef Eigen::SparseMatrix SparseMatrix;
typedef Eigen::Triplet Triplet;
typedef Eigen::PermutationMatrixSparseMatrix::Index> PermutationMatrix;

有的这个红的直接没有,没事, 仍按下面这个改

修为:

template
class LinearSolverEigen: public LinearSolver
{
public:
typedef Eigen::SparseMatrix SparseMatrix;
typedef Eigen::Triplet Triplet;
typedef Eigen::PermutationMatrix int> PermutationMatrix;

你可能感兴趣的:(SLAM,调试常见错误)