2017-08-10 9 views
0

私はいくつかのコードをコンパイルしようとしています。configure:エラー:libboost_atomicにリンクできません

brew install boost 

を使用してブーストをインストールしました。私は(

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! 

インターネット上で検索するすべての情報が得られていない:私は、それがlibboost_atomicを探してエラーを生成しかし、私は

./configure 

の実行を許可

autoreconf --install 

が走りました開発者ではなくソフトウェアのユーザーなので、適切な条件を探しているかどうかはわかりません)。

誰かが私に行方不明を教えてもらえますか?依存関係をさらにインストールする必要はありますか?

システムはMac 10.11です。

答えて

1

ブーストアトミックライブラリで開発するためのパッケージがありません。これは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

あなたはそこに指示をしています。

+0

ありがとうございます - 私はMacで何を探しているべきですか? Homebrewは 'boost'しかないようです(' brew install libboost-atomic-dev'は動作しません)。私はhttp://www.boost.org/users/download/からboostソースをダウンロードしました。もしこれをコンパイルしてインストールすれば、 'libboost_atomic'をインストールする必要がありますか?私はちょうど先に進んで、2つの矛盾したブーストのインストール(1つは自作で、もう1つは直接コンパイルされたもの)で終わることを躊躇する。 – Gerhard

+0

@Gerhard私はそれが説明からすべきだと思います。いずれの場合でも、試してみる前に自家製のインストールを削除してください。失敗した場合、いつでも元に戻ることができます。 – kabanus

+0

@Gerhard私はそれが1.52で導入されたと思うので、おそらく自作バージョンは古いものでした。 – kabanus

関連する問題