g2o ubuntu14.04 编译(含qt5 )

依赖关系 

必须:

Cmake

Eigen3 

http://www.cmake.org/

http://eigen.tuxfamily.org


1、安装cmake

2、编译eigen3

mkdir build
cd build/
cmake ..
sudo make install

可选(显示用)

Qt5

libQGLViewer 

3、qt下载http://download.qt.io/archive/qt/5.7/5.7.1/ (qt有点作,一定要注册,安装时要验证的)

       安装qt (./qt-opensource-linux-x64-5.7.1.run )

       默认装好qmake不能直接被调用,需要修改一下安装路径。

cd /usr/lib/x86_64-linux-gnu/qt-default/qtchooser

sudo gedit default.conf
#replace default
#/home/user/3rdparty_lib/Qt5.7.1/5.7/gcc_64/bin
#/home/user/3rdparty_lib/Qt5.7.1

4、libQGLViewer 下载http://www.libqglviewer.com/ 

cd libQGLViewer-2.6.4/

qmake

        make


5、github下载g20

      https://github.com/RainerKuemmerle/g2o

      修改cmake_modules/FindQGLViewer.cmake

      添加qt和QGLViewer配置

  set(Qt5_DIR "/home/user/3rdparty_lib/Qt5.7.1/5.7/gcc_64/lib/cmake/Qt5")
  set(QGLVIEWER_INCLUDE_DIR "/home/user/3rdparty_lib/libQGLViewer-2.6.4/QGLViewer")
  set(QGLVIEWER_LIBRARY_RELEASE "/home/user/3rdparty_lib/libQGLViewer-2.6.4/QGLViewer/libQGLViewer-qt5.so")

mkdir build

cd build

cmake ..

make -j4



你可能感兴趣的:(g2o ubuntu14.04 编译(含qt5 ))