我之所以打開這個主題是因爲有關設置cpp-netlib的信息非常棘手。我用來跟蹤這些步驟的文檔有點混亂,我不得不提到我是這個開源庫的初學者,在問我在這裏做錯了什麼之前是我做的:cpp-netlib安裝visual studio 2013
1.在設置cpp-netlib v 11.0之前,我安裝了boost.I運行它的例子,通過添加標題一定,到目前爲止一切看起來不錯。
2.I有設置爲CPP-NETLIB路徑BOOS_ROOT
3.After我解壓CPP-NETLIB文件我用cmake的建立它。我也注意到,有更多的CMakeList文件,所以我用第一個。它沒有工作...接下來,我查看了例子(.. \ cpp-netlib-0.11.0-final \ libs \ network \ example)並注意到了第二個。這個工作。
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 ==========
之前問我在做什麼錯了,我想提一提關於3 libs。我認爲CPP-NETLIB會談找不到主題。
在此先感謝!
檢查包括目錄指定正確。 – 2014-10-08 04:51:02
我設法解決了這個問題。似乎這個提升沒有包含任何庫。 – 2014-10-15 11:12:19
你可以發佈一個解決方案,以防萬一有人碰到相同的東西 – 2014-10-15 11:58:23