ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

error compiling g2o about g2o_viewer

asked 2016-01-22 03:21:51 -0500

jwlifly gravatar image

updated 2016-02-01 05:33:48 -0500

Hi everyone,

Recently, I have been studying g2o link:[https://github.com/RainerKuemmerle/g2o] , an open-source C++ framework for optimizing graph-based nonlinear error functions, I followed the README in the file g2o. When i cmake the file, it all went well, but when i make it, it failed, which is run on ubuntu 14.04 indigo. Obviouly, making g2o_viewer went wrong. The details are as follows:

ljw@ljw-K42JZ:~/the_third_party_package/g2o/build$ make
[  2%] Built target freeglut_minimal
[  3%] Built target opengl_helper
[  8%] Built target stuff
[ 23%] Built target core
[ 24%] Built target g2o_cli_library
[ 25%] Built target g2o_cli_application
[ 33%] Built target types_slam3d
[ 40%] Built target types_slam2d
[ 48%] Built target g2o_simulator_library
[ 48%] Built target g2o_simulator2d_application
[ 49%] Built target g2o_simulator3d_application
Linking CXX shared library ../../../../lib/libg2o_viewer.so
[ 57%] Built target viewer_library
Linking CXX executable ../../../../bin/g2o_viewer
../../../../lib/libg2o_viewer.so: undefined reference to `QGLViewer::setPathKey(int, int)'
../../../../lib/libg2o_viewer.so: undefined reference to `QGLViewer::setPlayPathStateKey(int)'
../../../../lib/libg2o_viewer.so: undefined reference to `qglviewer::Camera::setSceneRadius(float)'
../../../../lib/libg2o_viewer.so: undefined reference to `qglviewer::Camera::addKeyFrameToPath(int)'
../../../../lib/libg2o_viewer.so: undefined reference to `qglviewer::Camera::draw(bool, float) const'
../../../../lib/libg2o_viewer.so: undefined reference to `qglviewer::Camera::deletePath(int)'
../../../../lib/libg2o_viewer.so: undefined reference to `QGLViewer::setMouseBinding(int,     QGLViewer::MouseHandler, QGLViewer::MouseAction, bool)'
../../../../lib/libg2o_viewer.so: undefined reference to `QGLViewer::setKeyFrameKey(int, int)'
../../../../lib/libg2o_viewer.so: undefined reference to `qglviewer::Camera::playPath(int)'
../../../../lib/libg2o_viewer.so: undefined reference to `QGLViewer::drawLight(unsigned int, float) const'
../../../../lib/libg2o_viewer.so: undefined reference to `qglviewer::Camera::resetPath(int)'
../../../../lib/libg2o_viewer.so: undefined reference to `QGLViewer::setAddKeyFrameStateKey(int)'
../../../../lib/libg2o_viewer.so: undefined reference to `QGLViewer::setPlayKeyFramePathStateKey(int)'
collect2: error: ld returned 1 exit status
make[2]: *** [../bin/g2o_viewer] Error 1
make[1]: *** [g2o/apps/g2o_viewer/CMakeFiles/g2o_viewer.dir/all] Error 2
make: *** [all] Error 2

I hope someone can help me solve the problem. Any suggestions are welcome. Thanks in advance.

jwlifly

edit retag flag offensive close merge delete

Comments

Maybe a version conflict? I haven't got qglviewer installed at all, so g2o_viewer is skipped during compilation.

Felix Endres gravatar image Felix Endres  ( 2016-01-22 10:45:17 -0500 )edit

Do you have qglviewer installed at all?

dornhege gravatar image dornhege  ( 2016-02-01 05:59:42 -0500 )edit

i tried to install it, but it went wrong. I don't know why

jwlifly gravatar image jwlifly  ( 2016-03-15 05:43:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-04-07 21:29:20 -0500

shafeeq gravatar image

I came across the same issue, found that in my system QGL viewer partially installed as some dependencies.
What I done was I build it with ccmake and removed all the QGL viewer part paths. And generated the make file. Then installed it.

edit flag offensive delete link more

Comments

can u explain in detail what you did? i am having the same issue.

icywhite gravatar image icywhite  ( 2016-06-10 12:52:45 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-01-22 03:21:51 -0500

Seen: 1,755 times

Last updated: Apr 07 '16