[osg-users] undefined reference

Joshua Robinson shooki.robinson at gmail.com
Mon May 25 22:34:17 PDT 2015


Howdy Romulans & Vulcans,

Newbie to OSG, trying to compile sample program osgWidget, get the
following error ... any help is appreciated.

undefined reference to `osgWidget::Widget::addColor(float, float, float,
float, osgWidget::Widget::Corner)'

######################################
#cmake file - For ALL myProjects
#
cmake_minimum_required(VERSION 2.8)
set(PROJECT_VERSION "1.0")
set(EXECUTABLE_OUTPUT_PATH "./" )
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/local/lib/cmake/"
"/usr/lib/cmake")
set(PROJECT_NAME home-prj01)
#
project(${PROJECT_NAME})
#
include_directories(${GNULIBS_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR}
${GLUT_INCLUDE_DIRS}
                    ${AR_DIRS} ${OpenCV_INCLUDE_DIRS}
${OPENSCENEGRAPH_INCLUDE_DIRS} "./dep/include")
# Find Packages
FIND_PACKAGE(OpenGL         REQUIRED)
FIND_PACKAGE(OpenSceneGraph REQUIRED)
FIND_PACKAGE(osg            REQUIRED)
FIND_PACKAGE(osgDB          REQUIRED)
FIND_PACKAGE(osgGA          REQUIRED)
FIND_PACKAGE(osgViewer      REQUIRED)
FIND_PACKAGE(osgWidget      REQUIRED)
FIND_PACKAGE(osgUtil        REQUIRED)
FIND_PACKAGE(OpenThreads    REQUIRED)
FIND_PACKAGE(OpenCV         REQUIRED)
FIND_PACKAGE(aruco          REQUIRED)
#
file( GLOB SOURCE "*.h" "osgWidgetCanvas.cpp" )
#
set(myOGL_LIBS ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES})
set(myOSG_LIBS ${OSG_LIBRARY} ${OSG_LIBS} ${OSGGA_LIBRARY} ${OSGDB_LIBRARY}
             ${OSGVIEWER_LIBRARY} ${OSGUTIL_LIBRARY} ${OSG}
             ${OPENSCENEGRAPH_LIBRARIES} ${OPENTHREADS_LIBRARY})
set(myAR_LIBS ${aruco_LIBS})
set(myOCV_LIB ${OpenCV_LIBS})
set(ALL_LIBRARIES ${myOGL_LIBS} ${myOSG_LIBS} ${myOCV_LIBS} ${myAR_LIBS})
#
link_directories(${OpenCV_LIB_DIR} ${OPENSCENEGRAPH_LIBRARY_DIR}
"./dep/lib")
add_executable(${PROJECT_NAME} ${SOURCE})
target_link_libraries(${PROJECT_NAME} ${ALL_LIBRARIES})
# end
############################################################################


What library  am I missing ?


Cheers,
-Joshua Robinson
"Live long and prosper" - Spock, a volcan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150526/fff3128f/attachment-0001.htm>


More information about the osg-users mailing list