Login  Register

Re: To link QVTKWidget library

Posted by matlabbe on Jun 25, 2017; 11:26pm
URL: http://official-rtab-map-forum.206.s1.nabble.com/To-link-QVTKWidget-library-tp3336p3342.html

Hi,

Which VTK version are you using? Make sure VTK is built with Qt support. See here to see what RTAB-Map is looking for to link this library:
        IF("${VTK_MAJOR_VERSION}" EQUAL 5)
            FIND_PACKAGE(QVTK REQUIRED) # only for VTK 5
        ELSE()
            list(FIND PCL_LIBRARIES vtkGUISupportQt value)
            IF(value EQUAL -1)
                SET(PCL_LIBRARIES "${PCL_LIBRARIES};vtkGUISupportQt")
                SET(ADD_VTK_GUI_SUPPORT_QT_TO_CONF TRUE)
            ENDIF(value EQUAL -1)
        ENDIF()

There is maybe a bug with the RGBD mapping example, which may needs to explicitly link to QVTK library if VTK 5 is found
FIND_PACKAGE(QVTK REQUIRED)
SET(INCLUDE_DIRS ${INCLUDE_DIRS} ${QVTK_INCLUDE_DIR})
SET(LIBRARIES ${LIBRARIES} ${QVTK_LIBRARY})

cheers,
Mathieu