boost version is wrong.
An error occurred while compiling muduo:
/home/shiliangw/code/muduo/examples/ace/ttcp/ttcp_asio_async.cc:147:76: error: ‘boost::asio::ip::tcp::acceptor’ {aka ‘class boost::asio::basic_socket_acceptorboost::asio::ip::tcp’} has no member named ‘get_io_service’ 147 | TtcpServerConnectionPtr new_connection(new TtcpServerConnection(acceptor.get_io_service()));
i thought it is because of the version of boost is wrong,but i don't which version can fit muduo.
the environment in my os: gcc 9.2.0 cmake 3.15.4 boost 1.71
i want to know which version suits muduo thanks
Try boost 1.69 or below, get_io_service() was removed in 1.70.0.
https://github.com/boostorg/asio/blob/95f7e936356810addf3a6b54dbd1129d10f3ba98/doc/history.qbk#L153
Another easy solution to this when you want to use boost 1.70 and above is to use get_executor() instead of get_io_service(). The ctor of TtcpServerConnection should be changed, too.
I've opened a PR #451 , it can fix this error. UPDATE: The PR is merged now.