rosmake error with Indigo
mlowney opened this issue · comments
I've been trying to get the dvo_slam code to work using ROS Indigo but have been running into problems. When the "rosmake dvo_core dvo_ros dvo_slam dvo_benchmark" command is called I get the following errors:
Linking CXX executable /home/cig/rosbuild_ws/package_dir/dvo_slam/g2o/g2o_src/bin/g2o_viewer
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to gluNewQuadric' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to
gluUnProject'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to gluCylinder' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to
gluPickMatrix'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to gluSphere' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libQGLViewer.so: undefined reference to
gluProject'
collect2: error: ld returned 1 exit status
It only occurs when we try to make dvo_slam and dvo_benchmark.
I had the same error. Adding the Following to the dvo_slam/g2o/g2o_src/g2o/apps/g2o_viewer/CMakeLists.txt file fixed it:
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} )
And change TARGET_LINK_LIBRARIES(g2o_viewer viewer_library) to
TARGET_LINK_LIBRARIES(g2o_viewer viewer_library ${OPENGL_LIBRARIES} ${GLUT_LIBRARY})
I have the same error, the solution provided doesn't work, instead the file has been overwritten with the previous version.