C++ 配置:错误:无法链接到libboost_原子

C++ 配置:错误:无法链接到libboost_原子,c++,boost,configure,C++,Boost,Configure,我正在尝试编译一些代码。我使用 brew install boost 它成功地完成了。然后我跑了 autoreconf --install 这样我就可以跑了 ./configure 但是,它在查找libboost\u-atomic时会生成一个错误: checking for a BSD-compatible install... /usr/local/bin/ginstall -c checking whether build environment is sane... yes chec

我正在尝试编译一些代码。我使用

brew install boost
它成功地完成了。然后我跑了

autoreconf --install
这样我就可以跑了

./configure
但是,它在查找
libboost\u-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 atomic)和您的Linux风格,看看能得到什么。对于基于Debian的系统(例如Ubuntu)

应该解决这个问题。您可能会遇到其他此类错误-冲洗并重复。如果所有其他操作都失败,您可以下载源代码,然后编译并安装:


您已经在那里做了说明。

谢谢-知道我应该在mac上寻找什么吗?Homebrew似乎只有
boost
而没有其他功能(
brew安装libboost原子开发工具
不起作用)。我已经从下载了boost源代码-如果我编译并安装了它,它是否应该安装
libboost\u atomic
?我犹豫是否继续尝试,以防我最终遇到两个相互冲突的boost安装(一个通过自制,另一个直接编译)。@Gerhard我认为应该,从描述中可以看出。在任何情况下,请在尝试之前删除自制安装。如果失败了,你可以随时返回。@Gerhard我想它是在1.52中引入的,所以也许自制版本太旧了。谢谢-我会试试的。仅供参考,brew安装boost-1.64。@Gerhard这是最新的,很奇怪。也许它在编译中缺少了一个标志。
sudo apt-get install libboost-atomic-dev