Important: Please read the Qt Code of Conduct -

[Resolved] link error when using QVTKWidget under QtCreator

  • 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@W4WindowType@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

    Any help please and thanks

  • Hi,

    Did you make a clean and call qmake once again? Sometimes it helps to clean old makefiles manually from build directory.

  • thanks guziemic for reply.I tied to do your suggestion, but the same errors appear

  • oh, i resolved it. I forget to add QtNetwork4.lib to the Input Linker

Log in to reply