PDA

View Full Version : using QVTKWidget under QtCreator : link error



cerina
4th October 2012, 19:21
Hi all,
I tried to use QVTKWidget in my application. I used the design to promote the class QVTKWidget to my widget.But, when i compile my program, i got this error:

FenClient.obj:-1: erreur : LNK2019: unresolved external symbol "public: __thiscall QVTKWidget::QVTKWidget(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0QVTKWidget@@QAE@PAVQWidget@@V?$QFlags@W4Window Type@Qt@@@@@Z) referenced in function "public: void __thiscall Ui_FenClient::setupUi(class QWidget *)" (?setupUi@Ui_FenClient@@QAEXPAVQWidget@@@Z)

and this one :

release\client.exe:-1: erreur : LNK1120: 1 unresolved externals
Even, when i add the libs to my .pro file , i still have these errors :

LIBS += -LC:/vtkqt/lib/vtk-5.8 -lvtkWidgets \
-LC:/vtkqt/lib/vtk-5.8 -lvtkCharts \
-LC:/vtkqt/lib/vtk-5.8 -lvtksys \
-LC:/vtkqt/lib/vtk-5.8 -lvtkGeovis \
-LC:/vtkqt/lib/vtk-5.8 -lvtkViews \
-LC:/vtkqt/lib/vtk-5.8 -lvtkInfovis \
-LC:/vtkqt/lib/vtk-5.8 -lvtkVolumeRendering \
-LC:/vtkqt/lib/vtk-5.8 -lvtkHybrid \
-LC:/vtkqt/lib/vtk-5.8 -lvtkRendering \
-LC:/vtkqt/lib/vtk-5.8 -lvtkGenericFiltering \
-LC:/vtkqt/lib/vtk-5.8 -lvtkGraphics \
-LC:/vtkqt/lib/vtk-5.8 -lvtkIO \
-LC:/vtkqt/lib/vtk-5.8 -lvtkCommon \
-LC:/vtkqt/lib/vtk-5.8 -lvtkProj4
I will appreciate all suggestions, thanks

ChrisW67
4th October 2012, 23:31
If you have not already, you need to rerun qmake after making the PRO file changes. BTW you only need the -L option once.

It looks like you have included all the VTK libraries. Is the library containing QVTKWidget part of VTK or a separate add-on? Is it present in LIBS?

cerina
5th October 2012, 11:58
If you have not already, you need to rerun qmake after making the PRO file changes. BTW you only need the -L option once.

It looks like you have included all the VTK libraries. Is the library containing QVTKWidget part of VTK or a separate add-on? Is it present in LIBS?
Hi , i found just QVTKWidgetPlugin.lib, and when i linked it, i got the same error