[vtkusers] Unresolved external symbol QVTKWidget

Lonni Besançon lonni.besancon at gmail.com
Wed Jun 17 12:45:17 EDT 2015

I'm trying to link VTK and Qt for my application.
I have a very simple code just using a QWidget and when compiling I'm
getting the "
1>Drawing.obj : error LNK2019: symbole externe non résolu
"__declspec(dllimport) public: __thiscall QVTKWidget::QVTKWidget(class
QWidget *,class QFlags<enum Qt::WindowType>)"
(__imp_??0QVTKWidget@@QAE at PAVQWidget@@V?$QFlags at W4WindowType@Qt@@@@@Z)
référencé dans la fonction "public: __thiscall Drawing::Drawing(void)"
(??0Drawing@@QAE at XZ)
1>Drawing.obj : error LNK2019: symbole externe non résolu
"__declspec(dllimport) public: virtual __thiscall
QVTKWidget::~QVTKWidget(void)" (__imp_??1QVTKWidget@@UAE at XZ) référencé dans
la fonction "public: __thiscall Drawing::~Drawing(void)"
(??1Drawing@@QAE at XZ)
" error.

Would anyone happen to know wher ethis comes from.

What I've done so far:
Build VTK with Qt5 support. Create a project that works just fine without Qt
and doesn't work when trying to add the qwidget. Copied 
QVTKWidgetPlugin.dll from C:\bin\VTK\bin\Debug to C:\Qt\5.4\plugins\designer
(following the procedure here :
http://www.vtk.org/Wiki/VTK/Tutorials/QtSetup ) but I could find the .lib.
Maybe that's the reason why I get this error; is it?

Have a nice day and thanks in advance.

View this message in context: http://vtk.1045678.n5.nabble.com/Unresolved-external-symbol-QVTKWidget-tp5732422.html
Sent from the VTK - Users mailing list archive at Nabble.com.

More information about the vtkusers mailing list