cpp-netlib 0.9.0 - unresolved external symbol "bool __cdecl boost::network::uri::detail::parse_uri_impl

190 views
Skip to first unread message

Adi Shavit

unread,
Jun 21, 2011, 4:24:54 AM6/21/11
to cpp-n...@googlegroups.com
Hi,

   I'm getting a linking error: 

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)

On Windows, with VS2008, with either boost 1.44 and 1.46.1 same linking problem.

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

Please advise,
Thanks,
Adi

Dean Michael Berris

unread,
Jun 22, 2011, 12:08:20 PM6/22/11
to cpp-n...@googlegroups.com
On Tue, Jun 21, 2011 at 6:24 PM, Adi Shavit <adis...@gmail.com> wrote:
> Hi,
>    I'm getting a linking error:
>
> 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)
>
> On Windows, with VS2008, with either boost 1.44 and 1.46.1 same linking
> problem.

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

Adi Shavit

unread,
Jun 22, 2011, 2:44:29 PM6/22/11
to cpp-n...@googlegroups.com
Thanks.


--
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.


Reply all
Reply to author
Forward
0 new messages