Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: ‘async_connect’ is not a member of ‘boost::asio’ #270

Closed
simonmorley opened this issue Jul 1, 2013 · 2 comments
Closed

Comments

@simonmorley
Copy link

Was working through your example but get continuously stuck compiling your sample applications.

Have tried this on both OSX 10.7 and Ubuntu 12 with Boost installed via brew and apt respectively.

Is this something wrong with my setup or have I missed a stage?

/home/ninjs/websocketpp/transport/asio/endpoint.hpp: In member function ‘bool websocketpp::transport::asio::endpoint<config>::stopped() const’:
/home/ninjs/websocketpp/transport/asio/endpoint.hpp:274: error: ‘class boost::asio::io_service’ has no member named ‘stopped’
/home/ninjs/websocketpp/transport/asio/endpoint.hpp: In member function ‘void websocketpp::transport::asio::endpoint<config>::handle_resolve(typename websocketpp::transport::asio::connection<config>::ptr, boost::shared_ptr<boost::asio::basic_deadline_timer<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime>, boost::asio::deadline_timer_service<boost::posix_time::ptime, boost::asio::time_traits<boost::posix_time::ptime> > > >, websocketpp::transport::connect_handler, const boost::system::error_code&, boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>)’:
/home/ninjs/websocketpp/transport/asio/endpoint.hpp:540: error: ‘async_connect’ is not a member of ‘boost::asio’
@zaphoyd
Copy link
Owner

zaphoyd commented Jul 1, 2013

async_connect was added in Boost 1.47. You will need a copy of boost later than this to use client functionality in WebSocket++. For Ubuntu 12.04/10 two versions of boost are available via apt, 1.46 and 1.48. Use package name libboost1.48-all-dev to get the 1.48 version.

I am not as familiar with homebrew and don't know how to check exactly what version it installs. I've always compiled my own copy of boost on OS X. Anything at or above 1.47 should work though. Server roles may work with older versions still, though keep in mind some major improvements were made to the TLS/SSL systems in 1.47 that you'll likely want to have.

@simonmorley
Copy link
Author

Brilliant. Thought I was going nuts.

The Ubuntu version I'm using is pretty out of date too. Will build from source. Thanks, great library too :)

@zaphoyd zaphoyd closed this as completed Jul 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants