I'm trying to use the g2o library in a c++ project. I installed the library in two systems
- OpenSuse - dependencies through zypper install, g2o by compiling according to directions
- Ubuntu - all dependencies through apt-get, g2o by compiling according to directions
My .pro file includes these, in order to link to the .so 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/
When I try to #include things, I can see everything in the drop down menu.
However, I keep getting this message:
error: undefined reference to 'g2o::SparseOptimizer::setMethod(g2o::SparseOptimizer::Method)'
I'm stuck for hours here. Could you please shed some light? Thank you! :)