ubuntu18.04安装pcl库

参考Ubuntu18.04安装PCL 1.9.1(图文详解,附踩坑和测试)_ubuntu安装pcl_振华OPPO的博客-CSDN博客

遇到的问题

1 安装依赖时软件未满足依赖关系

sudo apt-get install libvtk7-qt-dev

报错软件包有未满足的依赖关系

参考(最新)Ubuntu18.04安装pcl点云库(遇坑大全,解决方法)_ubuntu安装pcl库_和道一文字_的博客-CSDN博客

sudo apt-get install libvtk7-dev=7.1.1+dfsg1-2

可能还会报类似错误,按照提示依次安装即可

2编译pcl时报

/usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h: In function ‘void Eigen::internal::parallelize_gemm(const Functor&, Index, Index, Index, bool)’:
/usr/include/eigen3/Eigen/src/Core/products/Parallelizer.h:162:19: error: ‘eigen_assert_exception’ is not a member of ‘Eigen’
   if (errorCount) EIGEN_THROW_X(Eigen::eigen_assert_exception());
具体参考Eigen问题解决:eigen_assert_exception’ is not a member of ‘Eigen’_error: ‘eigen_assert_exception’ is not a member of_avenger_fang的博客-CSDN博客

3/usr/lib/x86_64-linux-gnu/libapr-1.so.0 对‘uuid_generate@UUID_1.0’未定义的引用
/anaconda3/lib/libfontconfig.so.1:对‘FT_Done_MM_Var’未定义的引用

系统库和anaconda库版本不一致导致的冲突,将问题库从系统库移动到anaconda3下并同意替换即可

具体操作为

libfontconfig.so.1 原本在/usr/lib/x86_64-linux-gnu/libfontconfig.so.1复制替换到/home/***/anaconda3/lib/

libuuid.so.1原本在/lib/x86_64-linux-gnu/libfontconfig.so.1复制替换到/home/***/anaconda3/lib/

记得将原文件备份

3#include <pcl/visualization/pcl_visualizer.h>使用可视化类时报一系列未定义的引用错误

[100%] Linking CXX executable /home/zxs/vscode_ws/devel/lib/robosense/pcl_read
CMakeFiles/pcl_read.dir/src/pcl_read.cpp.o:在函数‘viewer(boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> >&, boost::shared_ptr<pcl::PointCloud<pcl::PointXYZ> >&)’中:
pcl_read.cpp:(.text+0x61a):对‘pcl::visualization::PCLVisualizer::PCLVisualizer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)’未定义的引用
pcl_read.cpp:(.text+0x688):对‘pcl::visualization::PCLVisualizer::createViewPort(double, double, double, double, int&)’未定义的引用
pcl_read.cpp:(.text+0x6cf):对
解决方法为

在当前包的CmakeLists中添加

find_package( PCL REQUIRED COMPONENTS common io visualization )

编译即可通过

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值