0

I'm trying to use the QVTKWidget in a QT-Project. I added the following libraries to my .pro file:

win32:CONFIG(release, debug|release): LIBS += -L'C:/Program Files/VTK 5.8.0/lib/vtk-5.8/' \
-lvtkCommon \
-lvtkRendering \
-lvtkHybrid \
-lvtkCharts \
-lvtkViews \
-lvtkInfovis \
-lvtkWidgets \
-lvtkexoIIc \
-lvtkVolumeRendering \
-lvtkGraphics \
-lvtkverdict \
-lvtkImaging \
-lvtkftgl \
-lvtkfreetype \
-lvtkIO \
-lvtkFiltering \
-lvtkDICOMParser \
-lvtkNetCDF_cxx \
-lvtkNetCDF \
-lvtkmetaio \
-lvtksys \
-lvtksqlite \
-lvtkpng \
-lvtktiff \
-lvtkjpeg \
-lvtkexpat \
-lvtklibxml2 \
-lvtkzlib \
-lvtkalglib \

When I create a new QVTKWidget object with

 vtkWidget = new QVTKWidget(this,QFlag(0));

I get a linker error:

 mainwindow.obj:-1: Fehler:LNK2019: unresolved external symbol "public: __cdecl
 QVTKWidget::QVTKWidget(class QWidget *,class QFlags<enum Qt::WindowType>)
 (??0QVTKWidget@@QEAA@PEAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z) referenced in   
 function "public: __cdecl MainWindow::MainWindow(class QWidget *)" 
 (??0MainWindow@@QEAA@PEAVQWidget@@@Z)

Thanks for any tips!!

fabian.kirstein
  • 708
  • 8
  • 26
  • See this thread - http://qt-project.org/forums/viewthread/20866 – sashoalm Aug 27 '13 at 12:40
  • Does `QVTKWidget* vtkWidget = new QVTKWidget;` work? If not, have you tried by adding the QVTKWidget directly from Qt Creator and see what happens as soon as you recompile it? – Andrea Aug 27 '13 at 12:40
  • did you try like this? http://stackoverflow.com/questions/718447/adding-external-library-into-qt-creator-project/14039295#14039295 – QT-ITK-VTK-Help Aug 27 '13 at 12:40
  • @sashoalm I read this thread too but I doesn't make sense for me. What does has QtNetwork4.lib to do with VTK? – fabian.kirstein Aug 27 '13 at 12:44
  • I'm not sure either, but the guy says it helped him, so try it just in case. – sashoalm Aug 27 '13 at 12:44
  • @BIG Your proposal is not working either. And don't have the widget in the creator. – fabian.kirstein Aug 27 '13 at 12:44
  • @sashoalm Ok, I tried it with the QtNetwork4.lib. But makes no difference. – fabian.kirstein Aug 27 '13 at 12:49
  • @linsenfips: I'm not sure about that, but I think that's a bad sign not having the QVTKWidget in the QtCreator/QtDesigner. It *could* indicate (As far as I know) a bad VTK configuration. I followed this guide (http://guitarcplusplus.blogspot.it/2013/02/itk-vtk-qt-on-window-7-64bit-and-visual.html) and that's indicated in section 3.3.3. – Andrea Aug 27 '13 at 12:50
  • @QT-ITK-VTK-Help I tried it by adding the QVTK lib but now I get 370 linker errors. Is it possible to find out what lib are exactly necessary for the QVTKwidget – fabian.kirstein Aug 27 '13 at 12:52
  • to add QVTKWidget plugin in designer http://qtitkvtkhelp.blogspot.in/2012/12/vtk-with-qvtk-configuration.html – QT-ITK-VTK-Help Aug 28 '13 at 06:23
  • 1
    did you try Cmake+QtCreator? – QT-ITK-VTK-Help Aug 28 '13 at 06:30
  • your list is missing lQVTK – Tab Sep 17 '13 at 12:59

0 Answers0