2016-05-01 20 views
0

私はcpp-netlibソースをダウンロードしてフォルダに展開しました。何らかの理由で完全に失われました。私は慎重にドキュメントを読んで、私はCMakeもダウンロードしなければならないと言いました。それから私は、ソースディレクトリを設定し、ディレクトリを構築し、「生成」ボタンをクリックすると、私はこの出力ました:CMakeを使ったcpp-netlibのビルド

The CXX compiler identification is MSVC 19.0.23506.0 
Check for working C compiler using: Visual Studio 14 2015 
Check for working C compiler using: Visual Studio 14 2015 -- works 
Detecting C compiler ABI info 
Detecting C compiler ABI info - done 
Check for working CXX compiler using: Visual Studio 14 2015 
Check for working CXX compiler using: Visual Studio 14 2015 -- works 
Detecting CXX compiler ABI info 
Detecting CXX compiler ABI info - done 
Detecting CXX compile features 
Detecting CXX compile features - done 
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/FindBoost.cmake:1657 (message): 
    Unable to find the requested Boost libraries. 

    Unable to find the Boost header files. Please set BOOST_ROOT to the root 
    directory containing Boost or BOOST_INCLUDEDIR to the directory containing 
    Boost's headers. 
Call Stack (most recent call first): 
    CMakeLists.txt:49 (find_package) 


Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR) 
Looking for pthread.h 
Looking for pthread.h - not found 
Found Threads: TRUE 
CMake Error at CMakeLists.txt:131 (export): 
    export given target "cppnetlib-client-connections" which is not built by 
    this project. 


Configuring incomplete, errors occurred! 
See also "C:/Users/Nick/Documents/cpp-netlib/cpp-netlib-build/CMakeFiles/CMakeOutput.log". 
See also "C:/Users/Nick/Documents/cpp-netlib/cpp-netlib-build/CMakeFiles/CMakeError.log" 

それはBoostライブラリを見つけることができませんでしたが、私はこだわっているところです。私はブーストをインストールしましたが、私はどこに "BOOST_ROOT"を設定するか分かりません。私は、その上のいくつかの研究をやったので、のような-DBOOST_ROOTオプションを指定して、コマンドラインを使用しようとしました:

c:\Program Files>cmake -DBOOST_ROOT=/boost/boost_1_55_0 

しかし、それは私に次のエラー与える:

CMake Error: The source directory "C:/Program Files" does not appear to contain 
CMakeLists.txt. 
Specify --help for usage, or press the help button on the CMake GUI. 

を私は何にとしては本当にわかりませんよ私はこれが私の問題の終わりではないと感じています...私が行方不明の何か明白なことはありますか?

答えて

1

あなたは(CMakeLists.txtが含まれます)ソースツリーのいずれかから実行cmakeのに必要な、または、より典型的には、ビルドフォルダから、それを実行し、ソースツリーがどこにあるか、それを教えてください。 一般的なケースは、ソースツリーの隣にビルドフォルダを作成し、cmake ../sourcedirを実行することです。

最初はguiを使用していたようです。確かにそれはBOOST_ROOT変数を設定する手段を提供しますか?

また、VC++のinclude/libパス(vcディレクトリ、または%INCLUDE%/%LIB%の設定)にboostを追加するだけであれば、おそらくBOOST_ROOTは必要ありません。 OpenSSLと同じです。

+0

ありがとうございました!これは私のためにそれを解決しました。 CMakeListsファイルに "set(BOOST_ROOT C:/ .....)"を追加し、別のビルドフォルダからビルドする必要がありました。 – Spook

関連する問題