我更新了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.0
和libboost_system.so.1.58.0
之間的衝突,但我該如何解決?
16.04配備了不同版本的Boost。您需要重新配置和重新構建PCL(或者使用您爲此構建的Boost的任何庫)。 – taketwo
我得到了同樣的錯誤,我認爲這是因爲升級到16.04也升級libboost和PCL的版本需要重新配置和構建。建立PCL1.8,看看它是如何發展的。 – MrBomb1985