Boost C++ Libraries: Ticket #4196: Code does not compile when using boost::asio::local::stream_protocol::iostream https://svn.boost.org/trac10/ticket/4196 <p> I found a reference to this problem on <a class="ext-link" href="http://old.nabble.com/Problems-with-boost%3a%3aasio%3a%3alocal%3a%3astream_protocol%3a%3aiostream-under-Boost-1.36.0-td19462107.html"><span class="icon">​</span>this page</a>. Unfortunately, there was no solution there to be found. </p> <p> I get the following errors when trying to use </p> <pre class="wiki">asio::local::stream_protocol::iostream stream_; </pre><p> initialization in the constructor of my class as: </p> <pre class="wiki">myclass::myclass(const std::string&amp; file) : stream_(file) {} </pre><p> Errors: </p> <pre class="wiki">/usr/local/include/boost/asio/basic_socket_streambuf.hpp: In member function ‘boost::asio::basic_socket_streambuf&lt;Protocol, StreamSocketService&gt;* boost::asio::basic_socket_streambuf&lt;Protocol, StreamSocketService&gt;::connect(T0) [with T0 = std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, Protocol = boost::asio::local::stream_protocol, StreamSocketService = boost::asio::stream_socket_service&lt;boost::asio::local::stream_protocol&gt;]’: /usr/local/include/boost/asio/basic_socket_iostream.hpp:114: instantiated from ‘boost::asio::basic_socket_iostream&lt;Protocol, StreamSocketService&gt;::basic_socket_iostream(T0) [with T0 = std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, Protocol = boost::asio::local::stream_protocol, StreamSocketService = boost::asio::stream_socket_service&lt;boost::asio::local::stream_protocol&gt;]’ myclass.cpp:14: instantiated from here /usr/local/include/boost/asio/basic_socket_streambuf.hpp:139: error: no type named ‘resolver_query’ in ‘class boost::asio::local::stream_protocol’ make: *** [myclass.o] Error 1 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4196 Trac 1.4.3 chris_kohlhoff Tue, 11 May 2010 08:38:19 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4196#comment:1 https://svn.boost.org/trac10/ticket/4196#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> As discussed elsewhere, the correct use is illustrated by the local/iostream_client.cpp example. </p> Ticket anonymous Wed, 26 Sep 2012 09:25:47 GMT <link>https://svn.boost.org/trac10/ticket/4196#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4196#comment:2</guid> <description> <p> boost::asio::local::stream_protocol is posix system specific, it cannot be used in windows, are u compiling it in windows? Please go for linux. </p> </description> <category>Ticket</category> </item> </channel> </rss>