我想建立VTK。在Cmake配置中,我刚刚检查了VTK_GROUP_QT并添加了一条qmake的路径,就像guide所说的那样。但是当我打开解决方案来构建它时,我得到了这个错误:
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
我使用VTK 7.0,Qt 4.8 VS2008和visual studio 2013来构建解决方案(cmake编译器)。 有什么问题 ? 这不重复。我没有写VTK知道这个问题。我需要知道是什么导致了这个错误:错误的编译器或x86 / x64问题或者......?