报错如下:
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集成的程序,后期要用这两个做医学图像处理。我基本上把网上与这个相关的方法都试,每次改动配置都会有新的错误出现,为了解决新的错误进行配置改动,最终又回到这个错误。