编译blam遇到这个错误:
/blam-master/internal/devel/lib/libpoint_cloud_odometry.so: undefined reference to
`pcl::search::KdTree<pcl::PointXYZ>::nearestKSearch(pcl::PointXYZ const&,
int, std::vector<int, std::allocator<int> >&, std::vector<float,
std::allocator<float> >&) const'
一般这种错都是链接出错,检查cmakelist中 link_directories target_link_libraries,没发现有什么不对,,
link_directories(
${catkin_LIBRARY_DIRS}
${PCL_LIBRARY_DIRS}
)
一般自己都是用${PCL_LIBRARIES} ,所以就把${PCL_LIBRARY_DIRS}改了,居然编译就通过了。。。。。
(${PCL_LIBRARIES} 和${PCL_LIBRARY_DIRS} 不是一样的么。。。)