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>
Read More:
- [Solved] PCL Compile Error: undefined reference to `pcl::PCLBase<pcl::PointXYZRGBA>:: XXX
- [Solved] Visual studio 2022 error LNK2019: unable to resolve external symbol for
- Windows: How to Solve PCL C2065 Error
- How to Solve QT error: LNK1158: Cannot Run “rc.exe”
- How to Solve Error: java.io.IOException: Resource [classpath:shiro.ini] could not be found.
- [Solved] error LNK2038: Detected mismatch of “RuntimeLibrary”: The value “MDd_DynamicDebug” does not match the value “MTd_StaticDebug”
- [Solved] C++ Compile: error LNK2019: unresolved external “XX“
- [Solved] error LNK2005: _bn_sub_part_words Already defined in bn_mul.obj
- error LNK2019: Unresolvable external symbols “__declspec(dllimport) public: int __thiscall QString::toWCharArray(wchar_t
- PCL 1.8.1 VTK 9.0 QT 5.14.9 [How to Solve]
- error C4996: ‘pcl::SAC_SAMPLE_SIZE‘ [How to Solve]
- Error lnk2038: detected “_ ITERATOR_ DEBUG_ Mismatched ‘level’ value of ‘0’
- [Solved] PCL Install error: ‘shared_ptr’ does not name a type
- LINK : fatal error LNK1104: Cannot Open the File “mfc90ud.lib”
- [Solved] Vs error: link: fatal error lnk1168: unable to open for writing
- error: #error PCL requires C++14 or above [Solved]
- jitpack.io ERROR: No build artifacts found [How to Solve]
- How to Solve OpenCV CVUI Error: LINK2019
- Error: # error PCL requires C++ 14 or above
- Openstack virtual machine disk IO error [How to Solve]