I tried to compile the example: echo_server_with_as_single_default.cpp
from boost examples on an:
- ubuntu 18.04
- boost 1.75.0
- g++ 10.1.0
Using the following commands to compile&link (I know it's not optimal, I reused the makefile from another project I am working on):
g++ -MT bin/.o/src/main.o -MD -MP -MF bin/.d/src/main.d -std=c++20 -Isrc -Ilib/ -g -Wfatal-errors -c -o bin/.o/src/main.o src/main.cpp
g++ -o bin/server bin/.o/src/main.o -lpthread -lrt -lboost_system -lboost_thread -lboost_chrono -lboost_context -lboost_coroutine -DBOOST_COROUTINES_NO_DEPRECATION_WARNING
And I get the following error:
I tried diferrent combinations but there is something I am missing. Any help?
error: 'awaitable' has not been declared in 'boost::asio'
22 | using boost::asio::awaitable;
question from:
https://stackoverflow.com/questions/65943019/g10-c20-boost-1-75-0-error-awaitable-has-not-been-declared-in-boost 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…