0
点赞
收藏
分享

微信扫一扫

PCL显示自定义点云类型报错 undefined reference to `pcl::visualization::PointCloudGeometryHandlerXYZ<MyPointType>

小时候是个乖乖 2022-03-30 阅读 65
c++

简介: 我使用pcl-1.8在可视化自定义的点云类型时,出现以下报错:

undefined reference to `pcl::visualization::PointCloudGeometryHandlerXYZ<MyPointType>
::PointCloudGeometryHandlerXYZ(boost::shared_ptrpcl::PointCloud\
<MyPointType const> const&)'

报错截图如下:

解决方法:

在包含头文件时添加如下两个文件:

#include <pcl/visualization/point_cloud_geometry_handlers.h>
#include <pcl/visualization/impl/point_cloud_geometry_handlers.hpp>

问题分析:

根据报错信息来看是缺少对pcl::visualization::PointCloudGeometryHandlerXYZ<PointXYZIL>::PointCloudGeometryHandlerXYZ(boost::shared_ptr<pcl::PointCloud<PointXYZIL> const> const&)的定义,因为我自定义了自己的点云类型,这里可能会有影响,深层的原因还不清楚。

举报

相关推荐

0 条评论