2016-08-02 151 views
3

我更新了Ubuntu版本從14.04 lts到16.04 lts ,並且在構建利用點雲庫的項目時遇到了問題。 (它曾經在Ubuntu 14.04很好地工作,我建我的項目qtcreator)Ubuntu 16.04上的PCL(點雲庫)1.7 LTS構建錯誤

的警告消息我是:

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

,並且錯誤是:

~/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)':

我可以請參閱libboost_system.so.1.54.0libboost_system.so.1.58.0之間的衝突,但我該如何解決?

+1

16.04配備了不同版本的Boost。您需要重新配置和重新構建PCL(或者使用您爲此構建的Boost的任何庫)。 – taketwo

+0

我得到了同樣的錯誤,我認爲這是因爲升級到16.04也升級libboost和PCL的版本需要重新配置和構建。建立PCL1.8,看看它是如何發展的。 – MrBomb1985

回答

1

對於從16.04開始建設pcl,請按照這個 tutorial。 但是沒有理由不建立PCL 1.8而不是1.7.x,因爲它向下兼容。

此外,1.7.2的Jochen Sprieckerhof存儲庫已過時1.7.2,因爲在Ubuntu 16.04中有一個本地repository。你可以簡單地做

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

我建議一個乾淨的un-並重新安裝一個建議的方式。

0

也許你應該下載此文件PCL-1.8-linux.deb

並運行此代碼:

sudo dpkg -i PCL-1.8-linux.deb. 
+0

這不提供問題的答案。一旦你有足夠的[聲譽](https://stackoverflow.com/help/whats-reputation),你將可以[對任何帖子發表評論](https://stackoverflow.com/help/privileges/comment);相反,[提供不需要提問者澄清的答案](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-c​​an- I-DO-代替)。 - [來自評論](/ review/low-quality-posts/17488856) – FluffyKitten