File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 4
4
# http://www.boost.org/LICENSE_1_0.txt)
5
5
6
6
include_directories (${CPP-NETLIB_SOURCE_DIR} )
7
- find_package ( Boost 1.41.0 COMPONENTS unit_test_framework system regex date_time thread filesystem )
7
+ find_package ( Boost 1.41.0 COMPONENTS program_options system regex date_time thread filesystem )
8
8
find_package ( OpenSSL )
9
9
include_directories (${OPENSSL_INCLUDE_DIR} )
10
10
find_package ( Threads )
@@ -13,6 +13,11 @@ set(Boost_USE_MULTITHREADED ON)
13
13
14
14
if (Boost_FOUND )
15
15
add_executable (http_client http_client.cpp )
16
- target_link_libraries (http_client ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_THREAD_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} )
16
+ add_executable (simple_wget simple_wget.cpp )
17
+ add_executable (uri uri.cpp )
18
+ target_link_libraries (http_client ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} )
19
+ target_link_libraries (simple_wget ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${OPENSSL_LIBRARIES} )
17
20
set_target_properties (http_client PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../../../build/example )
21
+ set_target_properties (simple_wget PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../../../build/example )
22
+ set_target_properties (uri PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../../../build/example )
18
23
endif ()
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ main(int argc, char *argv[]) {
53
53
std::string filename = get_filename (uri);
54
54
std::cout << " Saving to: " << filename << std::endl;
55
55
std::ofstream ofs (filename.c_str ());
56
- ofs << boost::network::body (response) << std::endl;
56
+ ofs << static_cast <std::string>( boost::network::body (response) ) << std::endl;
57
57
}
58
58
catch (std::exception &e) {
59
59
std::cerr << e.what () << std::endl;
You can’t perform that action at this time.
0 commit comments