To link QVTKWidget library

classic Classic list List threaded Threaded
4 messages Options
aj
Reply | Threaded
Open this post in threaded view
|

To link QVTKWidget library

aj
Hi,

I was trying to build the RGB-D example from the RTAB-Map git and I'm getting the following error :

Error LNK2001 unresolved external symbol "public: virtual class QVTKInteractor * __cdecl QVTKWidget::GetInteractor(void)" (?GetInteractor@QVTKWidget@@UEAAPEAVQVTKInteractor@@XZ) rgbd_mapping

I'm assuming it is because the QVTKWidget library is not being linked even though I have given the path required for included directories. Could someone help me with this?
Reply | Threaded
Open this post in threaded view
|

Re: To link QVTKWidget library

matlabbe
Administrator
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
aj
Reply | Threaded
Open this post in threaded view
|

Re: To link QVTKWidget library

aj
This post was updated on .
Hi,

I'm using VTK 7 and not 5. So when I add FIND_PACKAGE(QVTK REQUIRED), the
cmake gives me an error that it couldn't find QVTKConfig.cmake.

Is there some issue withe how I've installed VTK that it is not able to
find QVTK?

Regards,
Anargha
Reply | Threaded
Open this post in threaded view
|

Re: To link QVTKWidget library

matlabbe
Administrator
Hi,

TRy adding this part:
            list(FIND PCL_LIBRARIES vtkGUISupportQt value)
            IF(value EQUAL -1)
                SET(PCL_LIBRARIES "${PCL_LIBRARIES};vtkGUISupportQt")
            ENDIF(value EQUAL -1)