安装PCL
git clone https://github.com/PointCloudLibrary/pcl.git
cd pcl
mkdir build
cd build
cmake ..
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j2
sudo make -j2 install如果你不想使用Metslib(一个例子)或者找不到它,你可以修改PCL的CMakeLists.txt文件,注释掉或删除与Metslib相关的依赖项。这通常涉及到查找和替换文件中的metslib字样。
cmake报错The CXX compiler identification is unknown
ren@ren-VirtualBox:~/Documents/pcl/build$ cmake ..
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:26 (project):No CMAKE_CXX_COMPILER could be found.
解决办法安装g++
sudo apt install g++
cmake报错Could not find a package configuration file provided by “Eigen3”
CMake Error at CMakeLists.txt:322 (find_package):Could not find a package configuration file provided by "Eigen3" (requestedversion 3.3) with any of the following names:Eigen3Config.cmakeeigen3-config.cmake
解决安装eigen3
sudo apt-get install libeigen3-dev
cmake还是失败直接一口气安装下面所有库
sudo apt install git cmake libboost-all-dev libeigen3-dev libflann-dev libvtk7-dev libqhull-dev