我試圖在C++項目中使用g2o庫。我在兩個系統C++,g2o(Graph-Framework),qcreator,對方法的未定義引用
安裝庫- 了OpenSuse - 通過zypper的依賴通過編譯安裝,g2o根據方向
- Ubuntu的 - 通過apt-get的,g2o所有依賴通過編譯根據方向
我的.pro文件中包括這些,爲鏈接到。所以libaries:
INCLUDEPATH += /home/rhun/data/Coding/g2o/trunk/lib/
LIBS += -L/home/rhun/data/Coding/g2o/trunk/lib/
LIBS += -lg2o_calibration_odom_laser
LIBS += -lg2o_cli
LIBS += -lg2o_core
LIBS += -lg2o_csparse_extension
LIBS += -lg2o_ext_freeglut_minimal
LIBS += -lg2o_interface
LIBS += -lg2o_parser
LIBS += -lg2o_simulator
LIBS += -lg2o_solver_csparse
LIBS += -lg2o_solver_dense
LIBS += -lg2o_solver_eigen
LIBS += -lg2o_solver_pcg
LIBS += -lg2o_solver_slam2d_linear
LIBS += -lg2o_solver_structure_only
LIBS += -lg2o_stuff
LIBS += -lg2o_tutorial_slam2d
LIBS += -lg2o_types_data
LIBS += -lg2o_types_icp
LIBS += -lg2o_types_sba
LIBS += -lg2o_types_sclam2d
LIBS += -lg2o_types_sim3
LIBS += -lg2o_types_slam2d
LIBS += -lg2o_types_slam3d
INCLUDEPATH += /usr/include/suitesparse/
INCLUDEPATH += /home/rhun/data/Coding/g2o/tags/before-github-sync/
INCLUDEPATH += /home/rhun/data/Coding/g2o/tags/before-github-sync/EXTERNAL/eigen3/
INCLUDEPATH += /home/rhun/data/Coding/g2o/trunk/build/
當我嘗試#包括的東西,我能看到的一切下拉式菜單。
不過,我不斷收到這樣的信息:
error: undefined reference to 'g2o::SparseOptimizer::setMethod(g2o::SparseOptimizer::Method)'
我卡在這裏小時。你能否擺脫一些光線?謝謝! :)