0

cpp-netlib ソースをダウンロードし、フォルダーに解凍しましたが、何らかの理由で完全に失われました。ドキュメントを注意深く読んだところ、CMake もダウンロードする必要があると記載されていました。次に、ソース ディレクトリとビルド ディレクトリを設定し、[生成] ボタンをクリックすると、次の出力が得られました。

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.

私は今何をすべきかについて本当に確信が持てず、これで問題が解決したわけではないと感じています.何か明らかに欠けているものはありますか?

4

1 に答える 1

1

ソース ツリー (CMakeLists.txt を含む) から cmake を実行するか、より一般的にはビルド フォルダーから cmake を実行して、ソース ツリーの場所を伝える必要があります。一般的なケースは、ソース ツリーの横にビルド フォルダーを作成して実行することcmake ../sourcedirです。

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

あるいは、VC++ のインクルード/ライブラリ パス (vc ディレクトリ内、または %INCLUDE%/%LIB% を設定することによって) にブーストを入れるだけであれば、おそらく BOOST_ROOT は必要ありません。OpenSSL についても同様です。

于 2016-05-01T20:35:04.233 に答える