Boost logo

Boost :

Subject: [boost] [Asio] Linker error when compiling serialization example
From: jamesa (jamesa_at_[hidden])
Date: 2011-09-30 10:54:11


I receive a 2019 linker error when attempting to compile the asio
serialization example:

error LNK2019: unresolved external symbol "public: void __thiscall
connection::async_read<class std::vector<struct stock,class
std::allocator<struct stock> >,class boost::_bi::bind_t&lt;void,class
boost::_mfi::mf1&lt;void,class networkConnection,class
boost::system::error_code const &amp;&gt;,class boost::_bi::list2<class
boost::_bi::value<class networkConnection *>,struct boost::arg<1> > >
>(class std::vector<struct stock,class std::allocator<struct stock> >
&,class boost::_bi::bind_t&lt;void,class boost::_mfi::mf1&lt;void,class
networkConnection,class boost::system::error_code const &amp;&gt;,class
boost::_bi::list2<class boost::_bi::value<class networkConnection *>,struct
boost::arg<1> > >)"
(??$async_read_at_V?$vector_at_Ustock@@V?$allocator_at_Ustock@@@std@@@std@@V?$bind_t_at_XV?$mf1_at_XVnetworkConnection@@ABVerror_code_at_system@boost@@@_mfi_at_boost@@V?$list2_at_V?$value_at_PAVnetworkConnection@@@_bi_at_boost@@U?$arg@$00_at_3@@_bi_at_3@@_bi_at_boost@@@connection@@QAEXAAV?$vector_at_Ustock@@V?$allocator_at_Ustock@@@std@@@std@@V?$bind_t_at_XV?$mf1_at_XVnetworkConnection@@ABVerror_code_at_system@boost@@@_mfi_at_boost@@V?$list2_at_V?$value_at_PAVnetworkConnection@@@_bi_at_boost@@U?$arg@$00_at_3@@_bi_at_3@@_bi_at_boost@@@Z)
referenced in function "public: void __thiscall
networkConnection::handle_connect(class boost::system::error_code const
&,class boost::asio::ip::basic_resolver_iterator<class
boost::asio::ip::tcp>)"
(?handle_connect_at_networkConnection@@QAEXABVerror_code_at_system@boost@@V?$basic_resolver_iterator_at_Vtcp@ip_at_asio@boost@@@ip_at_asio@4@@Z)

The client class from the example has been renamed to network connection and
all the references corrected in the code, the client and stock files have
not been changed and I'm still getting this error. Can anyone give me some
insight has to what exactly I'm doing wrong here?

using: Windows 7 64 bit
         Microsoft visual studio 2008
         boost Ver. 1.47

--
View this message in context: http://boost.2283326.n4.nabble.com/Boost-Asio-Linker-error-when-compiling-serialization-example-tp3860028p3860028.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk