我正在尝试将点云库与 kinect 一起用于论文,但是当我按照本教程并尝试在 Visual Studio 2010 中编译解决方案时,我遇到了一些构建错误:
pcd_write.obj : error LNK2019: unresolved external symbol "public: int __thiscall pcl::PCDWriter::writeASCII(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct sensor_msgs::PointCloud2 const &,class Eigen::Matrix<float,4,1,0,4,1> const &,class Eigen::Quaternion<float,0> const &,int)" (?writeASCII@PCDWriter@pcl@@QAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUPointCloud2@sensor_msgs@@ABV?$Matrix@M$03$00$0A@$03$00@Eigen@@ABV?$Quaternion@M$0A@@8@H@Z) referenced in function "public: virtual int __thiscall pcl::PCDWriter::write(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct sensor_msgs::PointCloud2 const &,class Eigen::Matrix<float,4,1,0,4,1> const &,class Eigen::Quaternion<float,0> const &,bool)" (?write@PCDWriter@pcl@@UAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUPointCloud2@sensor_msgs@@ABV?$Matrix@M$03$00$0A@$03$00@Eigen@@ABV?$Quaternion@M$0A@@8@_N@Z)
pcd_write.obj : error LNK2019: unresolved external symbol "public: int __thiscall pcl::PCDWriter::writeBinary(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct sensor_msgs::PointCloud2 const &,class Eigen::Matrix<float,4,1,0,4,1> const &,class Eigen::Quaternion<float,0> const &)" (?writeBinary@PCDWriter@pcl@@QAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUPointCloud2@sensor_msgs@@ABV?$Matrix@M$03$00$0A@$03$00@Eigen@@ABV?$Quaternion@M$0A@@8@@Z) referenced in function "public: virtual int __thiscall pcl::PCDWriter::write(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct sensor_msgs::PointCloud2 const &,class Eigen::Matrix<float,4,1,0,4,1> const &,class Eigen::Quaternion<float,0> const &,bool)" (?write@PCDWriter@pcl@@UAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUPointCloud2@sensor_msgs@@ABV?$Matrix@M$03$00$0A@$03$00@Eigen@@ABV?$Quaternion@M$0A@@8@_N@Z)
pcd_write.obj : error LNK2019: unresolved external symbol "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PBDZZ) referenced in function "public: int __thiscall pcl::PCDWriter::writeASCII<struct pcl::PointXYZ>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class pcl::PointCloud<struct pcl::PointXYZ> const &,int)" (??$writeASCII@UPointXYZ@pcl@@@PCDWriter@pcl@@QAEHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$PointCloud@UPointXYZ@pcl@@@1@H@Z)
有人可以解释为什么会发生这些错误以及如何解决它们吗?非常感谢所有帮助,我总是接受答案!