Hi there, I am trying to compile the asio co-routine example but as far as
I can tell boost is looking for an 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
directory.
Here is the output with gcc 10:
/usr/lib/ccache/g++ -I../../src -g -Wall -pedantic -Wextra
-Werror -DASIO_HAS_CO_AWAIT -DBOOST_ASIO_HAS_CO_AWAIT -fcoroutines
--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:
experimental/coroutine:
No such file or directory
22 | #include
Any ideas on how to compile this example?