error: undefined reference to `QVTKWidget::QVTKWidget(QWidget*, QFlags<Qt::WindowType>)'

947 Views Asked by At

I m using Qt5.15 in Ubuntu 20.04. I want to use PCL to visualise point cloud data. To get PCL runnig with Qt, VTK library is also required. So in my system I have PCL 1.10 and VTK 7.1.1. I have taken sample code for testing the setup from here. I m getting following error:

error: undefined reference to `QVTKWidget::QVTKWidget(QWidget*, QFlags<Qt::WindowType>)'

Any suggestion for resolving this?

1

There are 1 best solutions below

0
On

Install Qt, Build VTK with QT_DIR set and Install. Build PCL with VTK_DIR and visualization module set. Install PCL. If custom install dirs add them to ubuntu’s ldconfig. I prefer building with cmake in qtcreator. Create new project in qtcreator and choose cmake as compiler in wizzard