このトピックを開いた理由は、cpp-netlib のセットアップに関する情報が非常に難しいためです。手順に従うために使用したドキュメントは少し混乱しています。私はこのオープン ソース ライブラリの初心者であることを言及する必要があります。 、そして私が何を間違えたのかを尋ねる前に、私がしたことは次のとおりです。
1.cpp-netlib v 11.0 を設定する前に、boost をインストールしました。必要に応じてヘッダーを追加して、サンプルを実行しました。これまでのところ、すべてが良好に見えます。
2. cpp-netlib のパス BOOS_ROOT をセットアップしました
3. cpp-netlib ファイルを解凍した後、cmake を使用してビルドしました。CMakeList ファイルが他にもあることに気付いたので、最初のファイルを使用します。うまくいきませんでした... 次に、例を調べました (. .\cpp-netlib-0.11.0-final\libs\network\example) そして 2 番目のものに気付きました。これは機能しました。
4.ソリューションを作成した後、さらに多くの例を見ました。私が興味を持っているのは、hello_wolrd_server で、すべてが正常に機能することをテストします。
5.ヘッダーを追加してビルドすると、次のログが表示されます。
1>------ Build started: Project: ZERO_CHECK, Configuration: Debug x64 ------
2>------ Build started: Project: atom_reader, Configuration: Debug x64 ------
3>------ Build started: Project: hello_world_async_server_with_work_queue, Configuration: Debug x64 ------
4>------ Build started: Project: hello_world_client, Configuration: Debug x64 ------
5>------ Build started: Project: hello_world_server, Configuration: Debug x64 ------
6>------ Build started: Project: http_client, Configuration: Debug x64 ------
7>------ Build started: Project: rss_reader, Configuration: Debug x64 ------
8>------ Build started: Project: simple_wget, Configuration: Debug x64 ------
9>------ Build started: Project: twitter_search, Configuration: Debug x64 ------
2> atom.cpp
2>d:\data\genericsearchengine\cpp-netlib-0.11.0-final\libs\network\example\atom\atom.hpp(12): fatal error C1083: Cannot open include file: 'boost/network/protocol/http.hpp': No such file or directory
2> main.cpp
2>d:\data\genericsearchengine\cpp-netlib-0.11.0-final\libs\network\example\atom\atom.hpp(12): fatal error C1083: Cannot open include file: 'boost/network/protocol/http.hpp': No such file or directory
2> Generating Code...
8> simple_wget.cpp
8>D:\Data\GenericSearchEngine\cpp-netlib-0.11.0-final\libs\network\example\simple_wget.cpp(17): fatal error C1083: Cannot open include file: 'boost/network/protocol/http/client.hpp': No such file or directory
3> hello_world_async_server_with_work_queue.cpp
3>D:\Data\GenericSearchEngine\cpp-netlib-0.11.0-final\libs\network\example\http\hello_world_async_server_with_work_queue.cpp(9): fatal error C1083: Cannot open include file: 'boost/network/include/http/server.hpp': No such file or directory
9> search.cpp
9>D:\Data\GenericSearchEngine\cpp-netlib-0.11.0-final\libs\network\example\twitter\search.cpp(7): fatal error C1083: Cannot open include file: 'boost/network/protocol/http/client.hpp': No such file or directory
6> http_client.cpp
6>D:\Data\GenericSearchEngine\cpp-netlib-0.11.0-final\libs\network\example\http_client.cpp(3): fatal error C1083: Cannot open include file: 'boost/network/protocol/http/server.hpp': No such file or directory
4> hello_world_client.cpp
7> rss.cpp
5>LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc120-mt-gd-1_56.lib'
4>D:\Data\GenericSearchEngine\cpp-netlib-0.11.0-final\libs\network\example\http\hello_world_client.cpp(14): fatal error C1083: Cannot open include file: 'boost/network/protocol/http/client.hpp': No such file or directory
7>d:\data\genericsearchengine\cpp-netlib-0.11.0-final\libs\network\example\rss\rss.hpp(12): fatal error C1083: Cannot open include file: 'boost/network/protocol/http.hpp': No such file or directory
7> main.cpp
7>d:\data\genericsearchengine\cpp-netlib-0.11.0-final\libs\network\example\rss\rss.hpp(12): fatal error C1083: Cannot open include file: 'boost/network/protocol/http.hpp': No such file or directory
7> Generating Code...
10>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug x64 ------
10>Project not selected to build for this solution configuration
========== Build: 1 succeeded, 8 failed, 0 up-to-date, 1 skipped ==========
何が間違っているのかを尋ねる前に、cpp-netlib が3 つのライブラリについて話していることに言及したいと思います。テーマが見つかりませんでした。
前もって感謝します!