配置:错误:无法链接到libboost_atomic
configure: error: Can not link to 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上编译东西时的一个常见问题,你的解决方法是总是谷歌库(boostatomic(和你的linux风格,看看会得到什么。对于基于 Debian 的系统(例如 Ubuntu(,
sudo apt-get install libboost-atomic-dev
应该解决这个问题。您可能会遇到其他此类错误 - 冲洗并重复。如果所有其他方法都失败了,您可以下载源代码,然后编译并安装它: http://www.boost.org/doc/libs/1_53_0/doc/html/atomic.html
你在那里有指示。
相关文章:
- 如何从 std::atomic 中提取指针 T<T>?
- std::atomic和std::condition_variable wait,notify_*方法之间的区别
- std::memory_order for std::atomic:<T>:wait
- MESI协议和std::atomic-它是否确保所有写入立即对其他线程可见?
- 在 lambda 表达式中使用 std::atomic
- C++std::atomic在程序员级别保证了什么
- 在Linux Mint上使用多个版本的libboost
- 如果在 2 个线程中使用,是否值得将size_t声明为 std::atomic?
- MyType 允许 std::atomic 的确切要求是什么<MyType>?
- 无法将类型"T&"的非常量左值引用绑定到类型"T"的右值 t++ std::atomic<T>
- gcc Atomic在gcc 4.1.1中内置了奇怪的行为
- 在 C++20 之前和之后初始化 std::atomic
- Red Hat:使用<atomic>编译很好,但链接器找不到__atomic_store_16;什么库?
- std::atomic 和 std::mutex 的相对性能
- 使用用户定义的类型 UDT 实例化 std::atomic<>。如果 UDT 具有虚函数,则 l 墨水将失败。为什么?
- 简单使用 std::atomic 在两个线程之间共享数据
- 如何使用 c++ libboost 运行进程并获取其输出?
- Port pthread_cond_broadcast to std::atomic
- std::atomic中的任何内容都是免费等待的
- 对于 CPU 无法原子操作的类型,std::atomic 有什么意义?