我在使用图书馆方面还很陌生,但我遇到了一些问题。
我已经在我的计算机(Windows 7、32 位)上安装了 PCL 和所有依赖项,我可以构建和使用像“简单云可视化”示例这样的简单示例。但如果我想使用更完整的示例,Visual Studio 2010 会报告链接错误。
如果我理解正确,我没有在“链接器/输入”中“包含”所有必要的“附加依赖项”。我尝试包含 lib 目录中的所有 .lib 文件,但错误报告仍然相同。
有谁知道,应该将哪个 .lib 添加为“附加依赖项”以使示例工作更完整?还是其他地方有问题?
错误报告:
1>main.obj:错误 LNK2019:未解析的外部符号“public:class vtkProperty * __thiscall vtkActor::GetProperty(void)”(?GetProperty@vtkActor@@QAEPAVvtkProperty@@XZ) 在函数“public: bool __thiscall pcl::可视化::PCLVisualizer::addSphere(struct pcl::PointXYZ const &,double,class std::basic_string,class std::allocator > const &,int)" (??$addSphere@UPointXYZ@pcl@@@PCLVisualizer@可视化@pcl@@QAE_NABUPointXYZ@2@NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) 1>main.obj:错误 LNK2019:函数中引用的未解析外部符号“void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)”(?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PBDZZ) “公共:bool __thiscall pcl::visualization::PCLVisualizer::addSphere(struct pcl::PointXYZ const &,double,class std::basic_string,class std::allocator > const &,int)" (??$addSphere@UPointXYZ@pcl@@@PCLVisualizer@visualization@pcl@@QAE_NABUPointXYZ @2@NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall vtkSmartPointerBase::~vtkSmartPointerBase(void)" (??1vtkSmartPointerBase@@QAE@XZ) 在函数 "public: __thiscall vtkSmartPointer::~vtkSmartPointer(void)" (??1?$vtkSmartPointer@VvtkLODActor@@@@QAE @XZ) 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall vtkSmartPointerBase::vtkSmartPointerBase(void)" (??0vtkSmartPointerBase@@QAE@XZ) 在函数“public: __thiscall vtkSmartPointer::vtkSmartPointer(void)”中引用)"(??0?$vtkSmartPointer@VvtkLODActor@@@@QAE@XZ) 1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall vtkSmartPointerBase::vtkSmartPointerBase(class vtkSmartPointerBase const &)" (??0vtkSmartPointerBase@@ QAE@ABV0@@Z) 在函数 "public: __thiscall vtkSmartPointer::vtkSmartPointer(class vtkSmartPointer const &)" (??0?$vtkSmartPointer@VvtkProp@@@@QAE@ABV0@@Z) 1>main.obj 中引用: 错误 LNK2019: 未解析的外部符号“public: __thiscall vtkSmartPointerBase::vtkSmartPointerBase(class vtkObjectBase *)” (??0vtkSmartPointerBase@@QAE@PAVvtkObjectBase@@@Z) 在函数“public: __thiscall vtkSmartPointer::vtkSmartPointer(class vtkSmartPointer const &)" (??$?0VvtkLODActor@@@?$vtkSmartPointer@VvtkProp@@@@QAE@ABV?$vtkSmartPointer@VvtkLODActor@@@@@Z) 1>main.obj:错误 LNK2019:未解析的外部符号“public:class vtkSmartPointerBase & __thiscall vtkSmartPointerBase::operator=(class vtkObjectBase *)”(??4vtkSmartPointerBase@@QAEAAV0@PAVvtkObjectBase@@@Z) 在函数“public:class vtkSmartPointer”中引用& __thiscall vtkSmartPointer::operator=(class vtkSmartPointer const &)" (??$?4VvtkLODActor@@@?$vtkSmartPointer@VvtkProp@@@@QAEAAV0@ABV?$vtkSmartPointer@VvtkLODActor@@@@@Z)(??$?4VvtkLODActor@@@?$vtkSmartPointer@VvtkProp@@@@QAEAAV0@ABV?$vtkSmartPointer@VvtkLODActor@@@@@Z)(??$?4VvtkLODActor@@@?$vtkSmartPointer@VvtkProp@@@@QAEAAV0@ABV?$vtkSmartPointer@VvtkLODActor@@@@@Z)