main.obj : error LNK2019: unresolved external symbol "bool __cdecl boost::network::uri::detail::parse_uri_impl(class boost::iterator_range<class std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> > > &,struct boost::network::uri::detail::uri_parts_default_base &,struct boost::network::tags::default_string)" (?parse_uri_impl@detail@uri@network@boost@@YA_NAAV?$iterator_range@V?$_String_const_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@4@AAUuri_parts_default_base@1234@Udefault_string@tags@34@@Z) referenced in function "bool __cdecl boost::network::uri::detail::parse_uri<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::network::http::tags::http_default_8bit_tcp_resolve>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,struct boost::network::uri::detail::uri_parts<struct boost::network::http::tags::http_default_8bit_tcp_resolve> &)" (??$parse_uri@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Uhttp_default_8bit_tcp_resolve@tags@http@network@boost@@@detail@uri@network@boost@@YA_NAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAU?$uri_parts@Uhttp_default_8bit_tcp_resolve@tags@http@network@boost@@@0123@@Z)
using namespace boost::network;using namespace boost::network::http;client::request request_("http://www.boost.org/");request_ << header("Connection", "close");client client_;client::response response_ = client_.get(request); // request should be request_std::string body = body(response_); // string body should have a different name as it clashes with boost::network::body
You need to build/link against the uri library, or in your command
used to build the example define the BOOST_NETWORK_NO_LIB macro to
inhibit the linking of the url lib. Unfortunately that example is not
very good and should actually be fixed.
Any takers on who might be interested in cleaning up/updating the documentation?
> The code is the simple C++ HTTP client from the web site (which actually
> contains 2 naming bugs:
>
> using namespace boost::network;
> using namespace boost::network::http;
> client::request request_("http://www.boost.org/");
> request_ << header("Connection", "close");
> client client_;
> client::response response_ = client_.get(request); // request should be
> request_
> std::string body = body(response_); // string body should
> have a different name as it clashes with boost::network::body
>
Yep, thanks for pointing these out.
I'm currently traveling and am not able to update the documentation,
but if anybody can fix this I would really appreciate it.
Cheers
--
Dean Michael Berris
http://about.me/deanberris
--
You received this message because you are subscribed to the Google Groups "The C++ Network Library" group.
To post to this group, send email to cpp-n...@googlegroups.com.
To unsubscribe from this group, send email to cpp-netlib+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cpp-netlib?hl=en.