yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
707 stars 92 forks source link

How to compile sleepy discord with boost asio instead of regular asio #190

Open GriffWithTwoFs opened 3 years ago

GriffWithTwoFs commented 3 years ago

I am using a library in boost called beast to simultaneous host a web server while running my bot. I get the following errors when I try to compile both in the same file. I'm thinking this has something to do with including two different ASIOs in the same file.

include/sleepy_discord/websocketpp_websocket.h:24:46: error: invalid covariant return type for ‘virtual boost::asio::io_service& SleepyDiscord::WebsocketppScheduleHandler::getIOService()’ 24 | inline websocketpp::lib::asio::io_service& getIOService() override {

include/sleepy_discord/asio_schedule.h:17:29: note: overridden function is ‘virtual asio::io_service& SleepyDiscord::ASIOBasedScheduleHandler::getIOService()’ 17 | virtual asio::io_service& getIOService() = 0;

Does anyone know how to resolve this?

yourWaifu commented 3 years ago

The library currently has issues with including boost asio but I have been working on it. You'll see some commits to develop about it very soon.

GriffWithTwoFs commented 3 years ago

Thank you! Looking forward to the boost Asio library resolution.