小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
slam稠密建图未定义g2o
-
g2o安装了,换了好几个版本其中包含slambook2里面的老版本都试过一直出现这个错误,请教一下是什么原因?
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::SparseOptimizer::removeVertex(g2o::HyperGraph::Vertex*)' /usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::OptimizableGraph::addVertex(g2o::HyperGraph::Vertex*, g2o::OptimizableGraph::Data*)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference tog2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::Solver*)' /usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::SparseOptimizer::removeVertex(g2o::HyperGraph::Vertex*)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference tog2o::OptimizableGraph::addVertex(g2o::HyperGraph::Vertex*, g2o::OptimizableGraph::Data*)' /usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::Solver*)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference tog2o::SparseOptimizer::removeVertex(g2o::HyperGraph::Vertex*)' /usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::OptimizableGraph::addVertex(g2o::HyperGraph::Vertex*, g2o::OptimizableGraph::Data*)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference tog2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::Solver*)' /usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::SparseOptimizer::removeVertex(g2o::HyperGraph::Vertex*)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference tog2o::OptimizableGraph::addVertex(g2o::HyperGraph::Vertex*, g2o::OptimizableGraph::Data*)' /usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::Solver*)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference tog2o::SparseOptimizer::removeVertex(g2o::HyperGraph::Vertex*)' /usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to
g2o::OptimizableGraph::addVertex(g2o::HyperGraph::Vertex*, g2o::OptimizableGraph::Data*)'
/usr/bin/ld: ../lib/libORB_SLAM2.so: undefined reference to `g2o::OptimizationAlgorithmLevenberg::OptimizationAlgorithmLevenberg(g2o::Solver*)'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rgbd_tum.dir/build.make:215:../Examples/RGB-D/rgbd_tum] 错误 1
make[2]: *** [CMakeFiles/mono_tum.dir/build.make:215:../Examples/Monocular/mono_tum] 错误 1
make[2]: *** [CMakeFiles/stereo_kitti.dir/build.make:215:../Examples/Stereo/stereo_kitti] 错误 1
make[1]: *** [CMakeFiles/Makefile2:197:CMakeFiles/rgbd_tum.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
make[2]: *** [CMakeFiles/mono_kitti.dir/build.make:215:../Examples/Monocular/mono_kitti] 错误 1
make[1]: *** [CMakeFiles/Makefile2:93:CMakeFiles/mono_tum.dir/all] 错误 2
make[2]: *** [CMakeFiles/rgbd_my.dir/build.make:215:../Examples/RGB-D/rgbd_my] 错误 1
make[1]: *** [CMakeFiles/Makefile2:171:CMakeFiles/stereo_kitti.dir/all] 错误 2
make[1]: *** [CMakeFiles/Makefile2:119:CMakeFiles/mono_kitti.dir/all] 错误 2
make[1]: *** [CMakeFiles/Makefile2:145:CMakeFiles/rgbd_my.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2 -