編譯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} 不是一樣的麼。。。)