电脑平台:Ubuntu 16.04 64位
boost版本:1.58
pcl版本:1.7
g++/gcc版本:4.8(后改成5.0,才可以通过编译)
跟着做高翔的“一起做RGBD-SLAM“第三讲的时候,需要保存生成的点云图,在程序中使用的是下面的一条语句:
pcl::io::savePCDFile( "./data/pointcloud.pcd", *cloud);
但是在在cmake编译的时候 总会报错,报错信息如下:
[ 87%] Building CXX object src/CMakeFiles/generate_pointcloud.dir/generatePointCloud.cpp.o
[100%] Linking CXX executable ../../bin/generate_pointcloud
CMakeFiles/generate_pointcloud.dir/generatePointCloud.cpp.o:在函数‘pcl::PCDWriter::write(std::string const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<float, 0> const&, bool)’中:
generatePointCloud.cpp:(.text._ZN3pcl9PCDWriter5writeERKSsRKNS_14PCLPointCloud2ERKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNS6_10QuaternionIfLi0EEEb[_ZN3pcl9PCDWriter5writeERKSsRKNS_14PCLPointCloud2ERKN5Eigen6MatrixIfLi4ELi1ELi0ELi4ELi1EEERKNS6_10QuaternionIfLi0EEEb]+0xc):对‘pcl::PCDWriter::writeASCII(std::string const&, pcl::PCLPointCloud2 const&, Eigen::Matrix<float, 4, 1, 0, 4, 1> const&, Eigen::Quaternion<