gaoxiang12 / slam_in_autonomous_driving

《自动驾驶中的SLAM技术》对应开源代码

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

G2o编译问题

ye-tingfeng opened this issue · comments

在g2o编译通过后,在thrid_patry/g2o文件中形成一个build文件,其中包含了build/g20/config.h文件。
但在整体空间中编译发现无法连接到thrid_patry/g2o/g2o/openmp_mutex.h中的 “#include "g2o/config.h"
图片

需要在packages.cmake中添加build路径:
include_directories(${PROJECT_SOURCE_DIR}/thirdparty/g2o/build/)
请问高博,这个问题是g2o库的CMakeList文件问题还是?

自己编译g2o 的时候make install 一下就可以了

g2o cmakelist.txt(377行) 表示 install 才会在g2o 目录下生成config.h

sudo make -j8
sudo make install

commented

补充一下,如果编译完成之后忘了进行make install的操作
可以再次去到g2o/build下面输入

sudo make install