我正在尝试从http://pointclouds.org/documentation/tutorials/pcl_visualizer.php运行以下 PCL 简单查看器示例 我已经使用 Cmake 和推荐的 Cmakelists.txt 成功构建了二叉树
生成后,当我尝试构建它时,出现以下错误:
error LNK2019: unresolved external symbol "public: void __thiscall pcl::visualization::PCLVisualizer::initCameraParameters(void)" (?initCameraParameters@PCLVisualizer@visualization@pcl@@QAEXXZ) referenced in function "class boost::shared_ptr<class pcl::visualization::PCLVisualizer> __cdecl simpleVis(class boost::shared_ptr<class pcl::PointCloud<struct pcl::PointXYZ> const >)" (?simpleVis@@YA?AV?$shared_ptr@VPCLVisualizer@visualization@pcl@@@boost@@V?$shared_ptr@$$CBV?$PointCloud@UPointXYZ@pcl@@@pcl@@@2@@Z)`
error LNK2019: unresolved external symbol "public: void __thiscall pcl::visualization::PCLVisualizer::addCoordinateSystem(double,int)" (?addCoordinateSystem@PCLVisualizer@visualization@pcl@@QAEXNH@Z) referenced in function "class boost::shared_ptr<class pcl::visualization::PCLVisualizer> __cdecl simpleVis(class boost::shared_ptr<class pcl::PointCloud<struct pcl::PointXYZ> const >)" (?simpleVis@@YA?AV?$shared_ptr@VPCLVisualizer@visualization@pcl@@@boost@@V?$shared_ptr@$$CBV?$PointCloud@UPointXYZ@pcl@@@pcl@@@2@@Z)
error LNK2019: unresolved external symbol "public: bool __thiscall pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int,double,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?setPointCloudRenderingProperties@PCLVisualizer@visualization@pcl@@QAE_NHNABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function "class boost::shared_ptr<class pcl::visualization::PCLVisualizer> __cdecl simpleVis(class boost::shared_ptr<class pcl::PointCloud<struct pcl::PointXYZ> const >)" (?simpleVis@@YA?AV?$shared_ptr@VPCLVisualizer@visualization@pcl@@@boost@@V?$shared_ptr@$$CBV?$PointCloud@UPointXYZ@pcl@@@pcl@@@2@@Z)
这些只是其中的几个……我在 cmakelists.txt 中遗漏了什么吗?
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(pcl_visualizer_viewports)
find_package(PCL 1.5.1 REQUIRED)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
add_executable (pcl_visualizer_demo pcl_visualizer_demo.cpp)
target_link_libraries (pcl_visualizer_demo ${PCL_LIBRARIES})
任何帮助表示赞赏。谢谢