0

I want to build VTK. in Cmake config I just checked VTK_GROUP_QT and added a path to qmake like the guide said so.but when Im opening the solution to build it I get this error:

Error   1   error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QImage & __thiscall QImage::operator=(class QImage &&)" (__imp_??4QImage@@QAEAAV0@$$QAV0@@Z) referenced in function "protected: virtual void __thiscall QVTKWidget::paintEvent(class QPaintEvent *)" (?paintEvent@QVTKWidget@@MAEXPAVQPaintEvent@@@Z)    F:\VTK2\GUISupport\Qt\QVTKWidget.obj    vtkGUISupportQt
Error   2   error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QPixmap & __thiscall QPixmap::operator=(class QPixmap &&)" (__imp_??4QPixmap@@QAEAAV0@$$QAV0@@Z) referenced in function "public: virtual void __thiscall QVTKPaintEngine::drawPixmap(class QRectF const &,class QPixmap const &,class QRectF const &)" (?drawPixmap@QVTKPaintEngine@@UAEXABVQRectF@@ABVQPixmap@@0@Z) F:\VTK2\GUISupport\Qt\QVTKPaintEngine.obj   vtkGUISupportQt
Error   3   error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QString & __thiscall QString::operator=(class QString &&)" (__imp_??4QString@@QAEAAV0@$$QAV0@@Z) referenced in function "private: void __thiscall vtkQtTableModelAdapter::updateModelColumnHashTables(void)" (?updateModelColumnHashTables@vtkQtTableModelAdapter@@AAEXXZ)   F:\VTK2\GUISupport\Qt\vtkQtTableModelAdapter.obj    vtkGUISupportQt
Error   4   error LNK1120: 3 unresolved externals   F:\VTK2\bin\Debug\vtkGUISupportQt-7.1.dll   1   1   vtkGUISupportQt
Error   5   error LNK2019: unresolved external symbol "__declspec(dllimport) public: class QImage & __thiscall QImage::operator=(class QImage &&)" (__imp_??4QImage@@QAEAAV0@$$QAV0@@Z) referenced in function "public: virtual void __thiscall vtkQtLabelRenderStrategy::RenderLabel(int * const,class vtkTextProperty *,class vtkUnicodeString)" (?RenderLabel@vtkQtLabelRenderStrategy@@UAEXQAHPAVvtkTextProperty@@VvtkUnicodeString@@@Z)    F:\VTK2\Rendering\Qt\vtkQtLabelRenderStrategy.obj   vtkRenderingQt
Error   6   error LNK1120: 1 unresolved externals   F:\VTK2\bin\Debug\vtkRenderingQt-7.1.dll    vtkRenderingQt
Error   7   error MSB3073: The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets  132 5   INSTALL

I used VTK 7.0 , Qt 4.8 VS2008 and visual studio 2013 to build the solution(cmake compiler). Whats the problem ? this is no duplicate. I did not write VTK to know the problem. I need to know what is causing this error: wrong compiler or x86/x64 problem or ... ?

Community
  • 1
  • 1
Chubakapra
  • 11
  • 3
  • ***I used VTK 7.0 , Qt 4.8 VS2008 and visual studio 2013*** You can't do that. Make sure all of your dependencies and your application are compiled with the same version of Visual Studio. – drescherjm Jan 24 '17 at 17:25
  • You probably should use a Qt5 version these days. Make sure it was built with Visual Studio 2013 if you are planning to use that with VTK and the rest of your code. – drescherjm Jan 24 '17 at 17:32
  • I am using Qt 5+ but when i tried I had and error saying you must use 4.x – Chubakapra Jan 25 '17 at 15:01
  • There is an option in cmake-gui to set the Qt version. Do that and regenerate. I would delete the build folder (keeping the source folder untouched) first then configure and generate again. – drescherjm Jan 25 '17 at 15:14
  • @drescherjm thanks man you saved me – Chubakapra Jan 26 '17 at 13:33
  • Glad I could help. – drescherjm Jan 26 '17 at 13:51

0 Answers0