Boost logo

Boost Users :

From: Pedro Pinto (pedro.pinto.chess_at_[hidden])
Date: 2020-04-25 22:49:05

Hi there, I am trying to compile the asio co-routine example but as far as
I can tell boost is looking for an <experimental/coroutine> header that
does not exist on my system. I am using boost 1.71 and gcc on ubuntu 20.04.
I tried both stock gcc (v9 on ubuntu) which does not have a coroutine
header and gcc 10 which does have it but not under the experimental

Here is the output with gcc 10:
/usr/lib/ccache/g++ -I../../src -g -Wall -pedantic -Wextra
  --std=c++2a -fdiagnostics-color -MD -MT CMakeFiles/mcbridge.dir
/src/main.cpp.o -MF CMakeFiles/mcbridge.dir/src/main.cpp.o.d -o
CMakeFiles/mcbridge.dir/src/main.cpp.o -c ../../src/main.cpp
In file included from /usr/include/boost/asio/co_spawn.hpp:22,
                from ../../src/main.cpp:4:
/usr/include/boost/asio/awaitable.hpp:22:10: fatal error:
No such file or directory
  22 | #include <experimental/coroutine>

Any ideas on how to compile this example?

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at