Smertig / banana

🍌 Modern C++ Telegram Bot API library
https://smertig.github.io/banana/master
MIT License
41 stars 4 forks source link

Examples outdated? How to use the library? #17

Open HerrNamenlos123 opened 2 years ago

HerrNamenlos123 commented 2 years ago

Hi, i would really like to use this library because it has so little dependencies, but i can't get it to work.

None of the examples seem to work, neither the one from the readme, nor the ones in the examples folder. They all include the banana/agent/default.hpp or something similar, but they don't exist. Only banana/agent/any.hpp exists but that doesn't work on its own. They kinda do exist in the source folder, is that a mistake? Or are the examples horribly out of date?

It would be really helpful if you could provide a working example for the latest version. I just want to send a message, that's it. I am on Windows.

Thank you in advance, Florian

HerrNamenlos123 commented 2 years ago

Alright, i just found out that i must link to other libraries as well, banana-default and banana-winapi, and so on. Now it's running, it isn't working yet, but i don't think it's an issue with your library anymore.

I don't think this is the most user-friendly thing, i think this decision should be done in the main CMakeLists, which would then link the agents if the flags specify it so. Plus, anyone looking for something (me too) would search in the top level CMakeLists and then they would see that specific flags add the agent libraries to the linking. A workaround would be to at least write in very apparent in the Readme, so nobody can oversee it.

Still, thank you for your work!

Smertig commented 2 years ago

Hi! Thanks for your feedback. I've checked docs and found out that they are really poor in terms of agent linking (default, WinAPI or any else). I definitely should make them more user-friendly. I'll rethink your suggestion about CMake flags, thank you.

HerrNamenlos123 commented 2 years ago

Nice. I am going to keep this issue open, you can close it anytime you want. The library is working perfectly for me now. Thank you