配置:错误:无法链接到libboost_atomic

问题描述:

我想编译一些代码。我安装了升压使用配置:错误:无法链接到libboost_atomic

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上的东西时,这是一个常见的问题,并且你的修正是总是谷歌库(boost原子)和你的linux的味道,看看得到什么。对于基于Debian的系统(例如Ubuntu),

sudo apt-get install libboost-atomic-dev 

应该解决这个问题。您可能会遇到其他类似的错误 - 冲洗并重复。如果一切都失败了,你可以下载源代码,并编译并安装: http://www.boost.org/doc/libs/1_53_0/doc/html/atomic.html

你在那里做了说明。

+0

谢谢 - 任何想法,我应该在Mac上寻找?自制软件似乎只有'boost',没有别的东西('brew install libboost-atomic-dev'不起作用)。我从http://www.boost.org/users/download/下载了boost源码 - 如果我编译并安装了它,它是否应该安装'libboost_atomic'?我毫不犹豫地继续尝试,以防万一我最终会出现两种相互冲突的增强安装(一种通过自制软件,另一种直接编译)。 – Gerhard

+0

@Gerhard我认为应该从描述中。在任何情况下,尝试之前删除自制安装。如果失败,你总是可以回去。 – kabanus

+0

@Gerhard我认为它是在1.52版本中推出的,所以也许这款自制版本已经过时了。 – kabanus