MFC与VTK,各个库和依赖项填写完整,报错error LNK2019、2001

![![![![![图片说明](https://img-ask.csdn.net/upload/201605/30/1464617821_173174.jpg)图片说明](https://img-ask.csdn.net/upload/201605/30/1464617808_108129.jpg)图片说明](https://img-ask.csdn.net/upload/201605/30/1464617798_381636.jpg)图片说明](https://img-ask.csdn.net/upload/201605/30/1464617783_175564.jpg)图片说明](https://img-ask.csdn.net/upload/201605/30/1464617767_377094.jpg)图片说明![图片说明](https://img-ask.csdn.net/upload/201605/30/1464617719_689853.jpg)图片说明

报错如下:
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: thiscall vtkSmartPointerBase::vtkSmartPointerBase(void)" (imp_??0vtkSmartPointerBase@@QAE@XZ),该符号在函数 "public: thiscall vtkSmartPointer::vtkSmartPointer(void)" (??0?$vtkSmartPointer@VvtkImageData@@@@QAE@XZ) 中被引用
1>vtkSDIView.obj : error LNK2001: 无法解析的外部符号 "
declspec(dllimport) public: thiscall vtkSmartPointerBase::vtkSmartPointerBase(void)" (imp_??0vtkSmartPointerBase@@QAE@XZ)
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: thiscall vtkSmartPointerBase::~vtkSmartPointerBase(void)" (imp_??1vtkSmartPointerBase@@QAE@XZ),该符号在函数 "public: thiscall vtkSmartPointer::~vtkSmartPointer(void)" (??1?$vtkSmartPointer@VvtkImageData@@@@QAE@XZ) 中被引用
1>vtkSDIView.obj : error LNK2001: 无法解析的外部符号 "
declspec(dllimport) public: thiscall vtkSmartPointerBase::~vtkSmartPointerBase(void)" (imp_??1vtkSmartPointerBase@@QAE@XZ)
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class vtkSmartPointerBase & thiscall vtkSmartPointerBase::operator=(class vtkObjectBase *)" (imp_??4vtkSmartPointerBase@@QAEAAV0@PAVvtkObjectBase@@@Z),该符号在函数 "public: class vtkSmartPointer & thiscall vtkSmartPointer::operator=(class vtkImageData *)" (??4?$vtkSmartPointer@VvtkImageData@@@@QAEAAV0@PAVvtkImageData@@@Z) 中被引用
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "
declspec(dllimport) public: class vtkSmartPointerBase & thiscall vtkSmartPointerBase::operator=(class vtkSmartPointerBase const &)" (imp_??4vtkSmartPointerBase@@QAEAAV0@ABV0@@Z),该符号在函数 "public: class vtkSmartPointer & thiscall vtkSmartPointer::operator=(class vtkSmartPointer const &)" (??4?$vtkSmartPointer@VvtkImageData@@@@QAEAAV0@ABV0@@Z) 中被引用
1>vtkSDIView.obj : error LNK2001: 无法解析的外部符号 "
declspec(dllimport) public: class vtkSmartPointerBase & thiscall vtkSmartPointerBase::operator=(class vtkSmartPointerBase const &)" (imp_??4vtkSmartPointerBase@@QAEAAV0@ABV0@@Z)
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) protected: thiscall vtkSmartPointerBase::vtkSmartPointerBase(class vtkObjectBase *,class vtkSmartPointerBase::NoReference const &)" (imp_??0vtkSmartPointerBase@@IAE@PAVvtkObjectBase@@ABVNoReference@0@@Z),该符号在函数 "protected: thiscall vtkSmartPointer::vtkSmartPointer(class vtkImageData *,class vtkSmartPointerBase::NoReference const &)" (??0?$vtkSmartPointer@VvtkImageData@@@@IAE@PAVvtkImageData@@ABVNoReference@vtkSmartPointerBase@@@Z) 中被引用
1>vtkSDIView.obj : error LNK2001: 无法解析的外部符号 "
declspec(dllimport) protected: thiscall vtkSmartPointerBase::vtkSmartPointerBase(class vtkObjectBase *,class vtkSmartPointerBase::NoReference const &)" (imp_??0vtkSmartPointerBase@@IAE@PAVvtkObjectBase@@ABVNoReference@0@@Z)
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static class vtkImageData * cdecl vtkImageData::New(void)" (imp_?New@vtkImageData@@SAPAV1@XZ),该符号在函数 "public: static class vtkSmartPointercdecl vtkSmartPointer::New(void)" (?New@?$vtkSmartPointer@VvtkImageData@@@@SA?AV1@XZ) 中被引用
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "
declspec(dllimport) public: class vtkImageData * thiscall vtkImageAlgorithm::GetOutput(void)" (imp_?GetOutput@vtkImageAlgorithm@@QAEPAVvtkImageData@@XZ),该符号在函数 "public: void thiscall CvtkSDIDoc::OnFileOpen(void)" (?OnFileOpen@CvtkSDIDoc@@QAEXXZ) 中被引用
1>vtkSDIDoc.obj : error LNK2019: 无法解析的外部符号 "
declspec(dllimport) public: static class vtkJPEGReader * cdecl vtkJPEGReader::New(void)" (imp_?New@vtkJPEGReader@@SAPAV1@XZ),该符号在函数 "public: static class vtkSmartPointercdecl vtkSmartPointer::New(void)" (?New@?$vtkSmartPointer@VvtkJPEGReader@@@@SA?AV1@XZ) 中被引用
1>vtkSDIView.obj : error LNK2019: 无法解析的外部符号 "
declspec(dllimport) public: static class vtkImageViewer2 * cdecl vtkImageViewer2::New(void)" (imp_?New@vtkImageViewer2@@SAPAV1@XZ),该符号在函数 "public: static class vtkSmartPointercdecl vtkSmartPointer::New(void)" (?New@?$vtkSmartPointer@VvtkImageViewer2@@@@SA?AV1@XZ) 中被引用
1>vtkSDIView.obj : error LNK2019: 无法解析的外部符号 "
declspec(dllimport) public: static class vtkRenderWindowInteractor * cdecl vtkRenderWindowInteractor::New(void)" (imp_?New@vtkRenderWindowInteractor@@SAPAV1@XZ),该符号在函数 "public: static class vtkSmartPointer __cdecl vtkSmartPointer::New(void)" (?New@?$vtkSmartPointer@VvtkRenderWindowInteractor@@@@SA?AV1@XZ) 中被引用
1>G:\Example_VTK\vtkSDI\vtkSDI\Debug\vtkSDI.exe : fatal error LNK1120: 10 个无法解析的外部命令

这是我第一个VTK与MFC集成的程序,后期要用这两个做医学图像处理。我基本上把网上与这个相关的方法都试,每次改动配置都会有新的错误出现,为了解决新的错误进行配置改动,最终又回到这个错误。


1个回答

我的lib库也没有问题,按如下加入的附加依赖项:
G:\VTK6.3.0\bin\lib\Debug\vtkftgl-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkGeovisCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkgl2ps-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkGUISupportMFC-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkhdf5_hl-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkhdf5-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingColor-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingFourier-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingGeneral-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingHybrid-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingMath-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingMorphological-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingSources-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingStatistics-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkImagingStencil-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkInfovisCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkInfovisLayout-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkInteractionImage-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkInteractionStyle-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkInteractionWidgets-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOAMR-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOEnSight-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOExodus-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOExport-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOGeometry-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOImage-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOImport-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOInfovis-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOLegacy-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOLSDyna-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOMINC-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOMovie-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIONetCDF-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOParallel-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOParallelXML-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOPLY-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOSQL-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOVideo-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOXML-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkIOXMLParser-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkjpeg-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkjsoncpp-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtklibxml2-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkmetaio-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkNetCDF_cxx-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkNetCDF-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkoggtheora-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkParallelCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkpng-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkproj4-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingAnnotation-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingContext2D-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingContextOpenGL-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingFreeType-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingGL2PS-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingImage-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingLabel-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingLIC-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingLOD-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingOpenGL-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingVolume-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkRenderingVolumeOpenGL-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtksqlite-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtksys-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtktiff-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkverdict-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkViewsContext2D-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkViewsCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkViewsInfovis-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkzlib-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkalglib-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkChartsCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonColor-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonComputationalGeometry-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonDataModel-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonExecutionModel-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonMath-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonMisc-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonSystem-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkCommonTransforms-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkDICOMParser-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkDomainsChemistry-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkexoIIc-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkexpat-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersAMR-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersCore-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersExtraction-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersFlowPaths-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersGeneral-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersGeneric-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersGeometry-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersHybrid-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersHyperTree-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersImaging-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersModeling-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersParallel-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersParallelImaging-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersProgrammable-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersSelection-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersSMP-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersSources-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersStatistics-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersTexture-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkFiltersVerdict-6.3.lib
G:\VTK6.3.0\bin\lib\Debug\vtkfreetype-6.3.lib

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐