【发布时间】:2014-03-17 02:35:04
【问题描述】:
我从 github 下载了 pcl-1.7.1 版本,并尝试使用
构建代码cd PCL-1.6.0 && mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
sudo make install
cmake 命令运行成功,并写下有关 boost
-- Boost version: 1.55.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- thread
-- date_time
-- iostreams
问题来自 make 命令,一段时间后返回以下错误:
Scanning dependencies of target pcl_convert_pcd_ascii_binary
[ 12%] Building CXX object io/tools/CMakeFiles/pcl_convert_pcd_ascii_binary.dir/convert_pcd_ascii_binary.cpp.o
Linking CXX executable ../../bin/pcl_convert_pcd_ascii_binary
../../lib/libpcl_common.so.1.7.1: error: undefined reference to 'boost::thread::join_noexcept()'
../../lib/libpcl_common.so.1.7.1: error: undefined reference to 'boost::thread::start_thread_noexcept()'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::detail::permissions(boost::filesystem::path const&, boost::filesystem::perms, boost::system::error_code*)'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::path::extension() const'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::detail::dir_itr_close(void*&, void*&)'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::path::stem() const'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::detail::directory_iterator_increment(boost::filesystem::directory_iterator&, boost::system::error_code*)'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::filesystem::directory_entry::m_get_status(boost::system::error_code*) const'
../../lib/libpcl_io.so.1.7.1: error: undefined reference to 'boost::thread::do_try_join_until_noexcept(timespec const&, bool&)'
collect2: ld returned 1 exit status
make[2]: *** [bin/pcl_convert_pcd_ascii_binary] Error 1
make[1]: *** [io/tools/CMakeFiles/pcl_convert_pcd_ascii_binary.dir/all] Error 2
make: *** [all] Error 2
这是一个链接问题是否正确?会不会是 boost 安装导致了问题?
我通过在 boost_1_55_0 目录中执行以下命令从源代码(版本 1.55.0)构建了 boost 库
sudo ./bootstrap
sudo ./b2 install
然后将 boost 安装在 /usr/local/include 和 /usr/local/lib 中
我使用 32 位 Ubuntu 12.04
【问题讨论】:
-
这是一个链接问题。要查看链接器尝试运行的命令以及它引入的库,请在运行 make 时像这样运行它:
VERBOSE=1 make -
我遇到了一个类似这样的问题,但我不记得我是如何解决的。这可能是多个版本的 boost 的问题。也尝试运行
ccmake,而不是cmake。
标签: c++ boost point-cloud-library