簡體   English   中英

配置:錯誤:無法鏈接到libboost_atomic

[英]configure: error: Can not link to libboost_atomic

我正在嘗試編譯一些代碼。 我使用安裝了boost

brew install boost

成功完成。 然后我跑了

autoreconf --install

然后讓我跑步

./configure

但是,它會在尋找libboost_atomic時產生錯誤:

checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking build system type... x86_64-apple-darwin15.6.0
checking host system type... x86_64-apple-darwin15.6.0
checking for boostlib >= 1.60... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread-mt... yes
checking whether the Boost::Log library is available... yes
checking for exit in -lboost_log-mt... yes
checking for exit in -lboost_log_setup-mt... yes
checking whether the Boost::Filesystem library is available... yes
checking for exit in -lboost_filesystem... yes
checking whether the Boost::Program_Options library is available... yes
checking for exit in -lboost_program_options-mt... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Chrono library is available... yes
checking for exit in -lboost_chrono-mt... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex-mt... yes
checking whether the Boost::Date_Time library is available... yes
checking for exit in -lboost_date_time-mt... yes
checking for main in -lboost_atomic... no
configure: error: Can not link to libboost_atomic!

在互聯網上搜索並沒有產生任何信息(我是該軟件的用戶,而不是開發人員,所以我不確定我在尋找正確的術語)。

誰能告訴我我所缺少的嗎? 我是否需要安裝其他依賴項?

系統為Mac 10.11。

您缺少使用Boost原子庫進行開發的軟件包。 在Linux上編譯內容時,這是一個常見的問題,而您的解決方法是始終使用Google庫(增強型原子庫)和Linux風格來查看獲得的內容。 對於基於Debian的系統(例如Ubuntu),

sudo apt-get install libboost-atomic-dev

應該解決這個問題。 您可能還會遇到其他此類錯誤-沖洗並重復。 如果其他所有方法均失敗,則可以下載源代碼並進行編譯和安裝: http : //www.boost.org/doc/libs/1_53_0/doc/html/atomic.html

您在這里有說明。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM