acfr / cam_lidar_calibration

(ITSC 2021) Optimising the selection of samples for robust lidar camera calibration. This package estimates the calibration parameters from camera to lidar frame.
Apache License 2.0
457 stars 107 forks source link

I am getting pcl::PCLBase<pcl::PointXYZIR> and undefined reference to `pcl::KdTreeFLANN<pcl::PointXYZIR, flann::L2_Simple<float> >::KdTreeFLANN(bool) while library linking #50

Closed anamadheya closed 10 months ago

anamadheya commented 10 months ago

I am using ROS Noetic to build some calibration code and I am facing

undefined reference to pcl::PCLBase::deinitCompute()' undefined reference to pcl::PCLBasepcl::PointXYZIR::initCompute()' undefined reference to pcl::PCLBase::setIndices(boost::shared_ptr<std::vector<int, std::allocator > const> const&)' pcl::KdTreeFLANN<pcl::PointXYZIR, flann::L2_Simple >::KdTreeFLANN(bool)' undefined reference to pcl::PCLBasepcl::PointXYZIR::setInputCloud(boost::shared_ptr const&)' /catkin_ws/devel/.private/cam_lidar_calibration/lib/libcam_lidar_calibration.so: undefined reference to pcl::KdTreeFLANN<pcl::PointXYZIR, flann::L2_Simple >::setSortedResults(bool)' catkin_ws/devel/.private/cam_lidar_calibration/lib/libcam_lidar_calibration.so: undefined reference to pcl::PCLBasepcl::PointXYZIR::setIndices(unsigned long, unsigned long, unsigned long, unsigned long)' catkin_ws/devel/.private/cam_lidar_calibration/lib/libcam_lidar_calibration.so: undefined reference to pcl::PCLBase::setIndices(boost::shared_ptr const&)' catkin_ws/devel/.private/cam_lidar_calibration/lib/libcam_lidar_calibration.so: undefined reference to pcl::PCLBasepcl::PointXYZIR::PCLBase()' catkin_ws/devel/.private/cam_lidar_calibration/lib/libcam_lidar_calibration.so: undefined reference to `pcl::PCLBasepcl::PointXYZIR::setIndices(boost::shared_ptr<std::vector<int, std::allocator > > const&)' collect2: error: ld returned 1 exit status make[2]: [CMakeFiles/feature_extraction_node.dir/build.make:303: catkin_ws/devel/.private/cam_lidar_calibration/lib/cam_lidar_calibration/feature_extraction_node] Error 1 make[1]: [CMakeFiles/Makefile2:3731: CMakeFiles/feature_extraction_node.dir/all] Error 2 make: *** [Makefile:141: all] Error 2

anamadheya commented 10 months ago

Please refer https://github.com/PointCloudLibrary/pcl/issues/5933 if you get something like this

jclinton830 commented 7 months ago

Please refer PointCloudLibrary/pcl#5933 if you get something like this

Glad you figured it out. Which branch were you testing?