#283 lGL and lXinerama not linked

closed-out-of-date
gazebo (59)
5
2011-01-27
2009-05-26
steple
No

Maybe I am the only one affected by this, but when linking gazebo, lGL and lXinerama are not included:

Linking CXX executable gazebo
cd .../gazebo/trunk/server && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/gazebo-exec.dir/link.txt --verbose=1
/usr/bin/c++ -O3 -DNDEBUG -fPIC CMakeFiles/gazebo-exec.dir/main.o -o gazebo -rdynamic -L.../gazebo/trunk/libgazebo -L.../gazebo/trunk/server/gui -L/usr/local/lib -lltdl -lOgreMain -L/usr/local/lib -lOgreMain -lode -L/usr/local/lib -lode -lxml2 -lXft -lopenal -lavformat -lavcodec -lboost_thread-gcc43-mt-1_35 -lboost_signals-gcc43-mt-1_35 -lfreeimage libgazebo_server.so audio_video/libgazebo_av.so gui/libgazebo_gui.so -lgazebo -lltdl -lode -lgazebo -lopenal /usr/local/lib/libfltk_images.a -lpng -lz -ljpeg /usr/local/lib/libfltk.a /usr/local/lib/libfltk_gl.a /usr/local/lib/libfltk_forms.a -lSM -lICE -lX11 -lXext -lm -Wl,-rpath,.../gazebo/trunk/libgazebo:.../gazebo/trunk/server/gui:.../gazebo/trunk/server:.../gazebo/trunk/server/audio_video:/usr/local/lib
gui/libgazebo_gui.so: undefined reference to `glRasterPos2f'
gui/libgazebo_gui.so: undefined reference to `glBegin'
gui/libgazebo_gui.so: undefined reference to `glDisable'
gui/libgazebo_gui.so: undefined reference to `glViewport'
gui/libgazebo_gui.so: undefined reference to `glRasterPos2i'
gui/libgazebo_gui.so: undefined reference to `glPixelStorei'
gui/libgazebo_gui.so: undefined reference to `glCallLists'
gui/libgazebo_gui.so: undefined reference to `glXUseXFont'
gui/libgazebo_gui.so: undefined reference to `XineramaQueryScreens'
libgazebo_server.so: undefined reference to `glXDestroyContext'
libgazebo_server.so: undefined reference to `glXMakeCurrent'
gui/libgazebo_gui.so: undefined reference to `glDrawPixels'
gui/libgazebo_gui.so: undefined reference to `glReadBuffer'
gui/libgazebo_gui.so: undefined reference to `XineramaIsActive'
gui/libgazebo_gui.so: undefined reference to `glGetIntegerv'
gui/libgazebo_gui.so: undefined reference to `glColor3ub'
libgazebo_server.so: undefined reference to `glXCreateContext'
gui/libgazebo_gui.so: undefined reference to `glVertex2i'
gui/libgazebo_gui.so: undefined reference to `glLoadIdentity'
gui/libgazebo_gui.so: undefined reference to `glEnd'
gui/libgazebo_gui.so: undefined reference to `glCopyPixels'
gui/libgazebo_gui.so: undefined reference to `glListBase'
gui/libgazebo_gui.so: undefined reference to `glDrawBuffer'
gui/libgazebo_gui.so: undefined reference to `glFlush'
libgazebo_server.so: undefined reference to `glXChooseVisual'
gui/libgazebo_gui.so: undefined reference to `glGenLists'
gui/libgazebo_gui.so: undefined reference to `glXSwapBuffers'
gui/libgazebo_gui.so: undefined reference to `glOrtho'
gui/libgazebo_gui.so: undefined reference to `glDeleteLists'

solution is to manually compile it with -lGL and -lXinerama

/usr/bin/c++ -O3 -DNDEBUG -fPIC CMakeFiles/gazebo-exec.dir/main.o -o gazebo -rdynamic -L.../gazebo/trunk/libgazebo -L.../gazebo/trunk/server/gui -L/usr/local/lib -lltdl -lOgreMain -L/usr/local/lib -lOgreMain -lode -L/usr/local/lib -lode -lxml2 -lXft -lopenal -lavformat -lavcodec -lboost_thread-gcc43-mt-1_35 -lboost_signals-gcc43-mt-1_35 -lfreeimage libgazebo_server.so audio_video/libgazebo_av.so gui/libgazebo_gui.so -lgazebo -lltdl -lode -lgazebo -lopenal /usr/local/lib/libfltk_images.a -lpng -lz -ljpeg /usr/local/lib/libfltk.a /usr/local/lib/libfltk_gl.a /usr/local/lib/libfltk_forms.a -lSM -lICE -lX11 -lXext -lm -Wl,-rpath,.../gazebo/trunk/libgazebo:.../gazebo/trunk/server/gui:.../gazebo/trunk/server:.../gazebo/trunk/server/audio_video:/usr/local/lib -lGL -lXinerama

and then run make again.

Discussion

  • Toby Collett

    Toby Collett - 2009-07-17

    can you describe the platoform you are building on (and whether you are still seeing the problem)

     
  • Nathan Koenig

    Nathan Koenig - 2011-01-27
    • status: open --> closed-out-of-date
     

Log in to post a comment.