When use function 'pcl::io::vtkPolyDataToPointCloud' in PCL 1.6.0, one may have error as follows:

 

1>demo.obj : error LNK2001: unresolved external symbol "void __cdecl pcl::io::vtkPolyDataToPointCloud<struct pcl::PointXYZRGB>(class vtkPolyData * const,class pcl::PointCloud<struct pcl::PointXYZRGB> &)" (??$vtkPolyDataToPointCloud@UPointXYZRGB@pcl@@@io@pcl@@YAXQAVvtkPolyData@@AAV?$PointCloud@UPointXYZRGB@pcl@@@1@@Z)
1>G:\projects\demo\demo.exe : fatal error LNK1120: 1 unresolved externals

 

This happens because function 'pcl::io::vtkPolyDataToPointCloud' has not been integrated in 'pcl_io_release.lib' library, instead it is implemented in the file 'vtk_lib_io.hpp', so we need to include both the header file and the hpp file:

 

#include <pcl/io/vtk_io.h>
#include <pcl/io/vtk_lib_io.h>
#include <pcl/io/vtk_lib_io.hpp>

 

相关文章:

  • 2022-02-06
  • 2022-12-23
  • 2021-07-14
  • 2022-03-08
  • 2022-03-06
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-10
  • 2022-02-02
  • 2021-09-07
  • 2021-12-10
  • 2021-11-23
  • 2022-03-06
相关资源
相似解决方案