tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Is it necessary to build tdutils to include it? #2994

Closed Guitarmadillo closed 1 week ago

Guitarmadillo commented 3 months ago

I am needing to include tdutils in order to access td::TlStorerToString functionality. I keep getting an error saying the compiler cannot open the include file td/tdutils/config.h. This file does not exist in that directory. Any help is appreciated.

levlam commented 3 months ago

You need to use CMake to correctly manage dependency of your project from tdutils.

Guitarmadillo commented 3 months ago

I have succeeded in including what I needed. My next question is related to the TlStorerToString type. Is this object meant to be converted to an std::string? I can't seem to find a way to print out the result of this variable after calling the store() method on a chat object, or one of it's member variables.

levlam commented 3 months ago

You never need to use TlStorerToString for TDLib API classes. You can find all public methods in td/telegram/td_api.h and you can use td::td_api::to_string to print a TDLib API object.