Ubuntu 16.04 LTS上的PCL(点云库)1.7生成错误 [英] PCL (point cloud library) 1.7 on Ubuntu 16.04 LTS build error

查看:1520
本文介绍了Ubuntu 16.04 LTS上的PCL(点云库)1.7生成错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Ubuntu版本从14.04 lts更新为16.04 lts 并在构建利用点云库的项目时遇到问题. (它曾经在Ubuntu 14.04上运行良好,我使用qtcreator构建了项目)

我收到的警告消息是:

警告:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so所需的libboost_system.so.1.54.0可能会发生冲突使用libboost_system.so.1.58.0

警告:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so所需的libboost_thread.so.1.54.0可能会发生冲突使用libboost_thread.so.1.58.0

警告:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so所需的libboost_filesystem.so.1.54.0可能会发生冲突使用libboost_filesystem.so.1.58.0

警告:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so所需的libboost_iostreams.so.1.54.0可能会发生冲突与libboost_iostreams.so.1.58.0

警告:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so所需的libboost_chrono.so.1.54.0可能会发生冲突使用libboost_chrono.so.1.58.0

,错误是:

〜/main.cpp:-1:错误:未定义引用`pcl :: visualization :: PCLVisualizer :: PCLVisualizer(std :: __ cxx11 :: basic_string,std :: allocator> const& ;, bool)'

〜/main.cpp:-1:错误:对`pcl :: visualization :: PCLVisualizer :: setPointCloudRenderingProperties(int,double,std :: __ cxx11 :: basic_string,std :: allocator> const& int的未定义引用)'

〜/main.cpp:-1:错误:对`pcl :: visualization :: PCLVisualizer :: setPointCloudRenderingProperties(int,double,std :: __ cxx11 :: basic_string,std :: allocator> const& int的未定义引用)'

〜/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1:在函数`pcl :: search :: OrganizedNeighbor :: OrganizedNeighbor(bool,float,unsigned int)':

〜/main.cpp:-1:错误:对`pcl :: search :: Search :: Search(std :: __ cxx11 :: basic_string,std :: allocator> const& ;, bool)的未定义引用''

〜/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1:在函数`pcl :: search :: OrganizedNeighbor :: OrganizedNeighbor(bool,float,unsigned int)':

〜/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1:在函数`pcl :: search :: OrganizedNeighbor :: OrganizedNeighbor(bool,float,unsigned int)':

我可以看到libboost_system.so.1.54.0libboost_system.so.1.58.0之间存在冲突,但是我该如何解决呢?

解决方案

要在16.04上从源代码构建pcl,请遵循此步骤 教程. 但是,由于没有向下兼容性,因此没有理由不构建PCL 1.8而不是1.7.x.

此外,用于1.7.2的Jochen Sprieckerhof存储库在1.7.2中已过时,因为在Ubuntu 16.04中,存在本机存储库.你可以简单地做

sudo apt-get update 
sudo apt-get install libpcl-dev

我建议您进行干净的Un-并以建议的方式之一重新安装.

I updated Ubuntu version from 14.04 lts to 16.04 lts and got problems when building projects that utilizes point cloud library. (It used to work well on Ubuntu 14.04 and I build my projects with qtcreator)

The warning messages I have are :

warning: libboost_system.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_system.so.1.58.0

warning: libboost_thread.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_common.so, may conflict with libboost_thread.so.1.58.0

warning: libboost_filesystem.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_filesystem.so.1.58.0

warning: libboost_iostreams.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_iostreams.so.1.58.0

warning: libboost_chrono.so.1.54.0, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libpcl_io.so, may conflict with libboost_chrono.so.1.58.0

and the errors are :

~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::PCLVisualizer(std::__cxx11::basic_string, std::allocator > const&, bool)'

~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::__cxx11::basic_string, std::allocator > const&, int)'

~/main.cpp:-1: error: undefined reference to `pcl::visualization::PCLVisualizer::setPointCloudRenderingProperties(int, double, std::__cxx11::basic_string, std::allocator > const&, int)'

~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':

~/main.cpp:-1: error: undefined reference to `pcl::search::Search::Search(std::__cxx11::basic_string, std::allocator > const&, bool)'

~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':

~/build-Desktop-Default/CMakeFiles/project_name.dir/main.cpp.o:-1: In function `pcl::search::OrganizedNeighbor::OrganizedNeighbor(bool, float, unsigned int)':

I can see there's conflict between libboost_system.so.1.54.0 and libboost_system.so.1.58.0 but how can I solve it?

解决方案

For building pcl from source on 16.04, please follow this tutorial. But there is then no reason to not build PCL 1.8 instead of 1.7.x, as it is downward compatible.

In addition the Jochen Sprieckerhof repository for 1.7.2 is outdated for 1.7.2, as in Ubuntu 16.04 there is a native repository. You can simply do

sudo apt-get update 
sudo apt-get install libpcl-dev

I recommend a clean un- and reinstall in one of the proposed ways.

这篇关于Ubuntu 16.04 LTS上的PCL(点云库)1.7生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆