2014-03-12 74 views
0

建設PCL-1.7.1的時候我已經下載從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_1_55_0目錄

sudo ./bootstrap 
sudo ./b2 install 

升壓,然後安裝在/ usr /本地/內部包括以下和/ usr /本地內置從源Boost庫(1.55.0版)/lib目錄

我用32位的Ubuntu 12.04

+1

這是一個鏈接問題。要查看鏈接器試圖運行的命令,以及它引入的庫,在運行make時,像這樣運行:'VERBOSE = 1 make' –

+1

我有一個問題,有點像這樣,但我可以'記住我是如何解決它的。這可能是多個版本的boost的問題。另外嘗試一下,而不是'cmake',運行'ccmake'。 –

回答

1

我發現了一些libboost文件在/ usr/lib目錄中,我忘了刪除最後安裝升壓(由@DJDuff指出)。刪除這些文件並重新安裝boost可以解決問題。