我在使用库方面相对较新,遇到了一些问题。
我已在我的计算机上(Windows 7,32位)安装了PCL和所有依赖项,并且可以构建和使用简单的示例,例如那个“Simple Cloud Visualization”示例。但是,如果我想要使用更完整的示例, Visual Studio 2010会报告链接错误。
如果我理解正确,我没有在“链接器/输入”中“包括”所有必要的“附加依赖项”。我尝试将lib目录中的所有.lib文件都包含进去,但错误报告仍然相同。
有人知道应该添加哪个.lib作为“附加依赖项”,以使更完整的示例正常工作吗?还是问题出在其他地方?
错误报告:
1>main.obj : error LNK2019: 未解析的外部符号 "public: class vtkProperty * __thiscall vtkActor::GetProperty(void)" (?GetProperty@vtkActor@@QAEPAVvtkProperty@@XZ),该符号在函数 "public: bool __thiscall pcl::visualization::PCLVisualizer::addSphere(struct pcl::PointXYZ const &,double,class std::basic_string > 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: 未解析的外部符号 "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PBDZZ),该符号在函数 "public: bool __thiscall pcl::visualization::PCLVisualizer::addSphere(struct pcl::PointXYZ const &,double,class std::basic_string > 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: 未解析的外部符号 "public: __thiscall vtkSmartPointerBase::~vtkSmartPointerBase(void)" (??1vtkSmartPointerBase@@QAE@XZ),该符号在函数 "public: __thiscall vtkSmartPointer::~vtkSmartPointer(void)" (??1?$vtkSmartPointer@VvtkLODActor@@@@QAE@XZ) 中被引用 1>main.obj : error LNK2019: 未解析的外部符号 "public: __thiscall vtkSmartPointerBase::vtkSmartPointerBase(void)" (??0vtkSmartPointerBase@@QAE@XZ),该符号在函数 "public: __thiscall vtkSmartPointer::vtkSmartPointer(void)" (??0?$vtkSmartPointer@VvtkLODActor@@@@QAE@XZ) 中被引用 1>main.obj : error LNK2019: 未解析的外部符号 "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 : error 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 : error 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) 中被引用