Skip to content

UniversalTelegramBot.h: error compiling in Arduino IDE. #360

@Arxenaline

Description

@Arxenaline

Hi, I'm using Arduino IDE and when I include UniversalTelegramBot.h in a sketch for ESP32 (Board ESP32 Dev Module) and compile it, I get the error above:

In file included from /home/arx-daw/Documents/Sources/ESP/Irrighino_OTA_1.0/Irrighino_OTA_1.0.ino:43:
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:41:9: error: ISO C++ forbids declaration of 'byte' with no type [-fpermissive]
41 | typedef byte (*GetNextByte)();
| ^~~~
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:41:9: error: typedef 'byte' is initialized (use 'decltype' instead)
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:41:16: error: 'GetNextByte' was not declared in this scope
41 | typedef byte (GetNextByte)();
| ^~~~~~~~~~~
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:42:9: error: reference to 'byte' is ambiguous
42 | typedef byte
(*GetNextBuffer)();
| ^~~~
. . .
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:80:35: error: 'GetNextByte' has not been declared
80 | GetNextByte getNextByteCallback,
| ^~~~~~~~~~~
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:81:35: error: 'GetNextBuffer' has not been declared
81 | GetNextBuffer getNextBufferCallback,
| ^~~~~~~~~~~~~
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:102:28: error: 'GetNextByte' has not been declared
102 | GetNextByte getNextByteCallback,
| ^~~~~~~~~~~
/home/arx-daw/Documents/Sources/ESP/ESP/libraries/UniversalTelegramBot/src/UniversalTelegramBot.h:103:28: error: 'GetNextBuffer' has not been declared
103 | GetNextBuffer getNextBufferCallback,
| ^~~~~~~~~~~~~

I have a fresh installation of :
Ubuntu Cinnamon 24.04 "Noble Numbat" LTS
Arduino IDE 1.8.19 from package manager of Ubuntu
UniversalTelegramBot 1.3.0 from Libray Manager of Arduino IDE

Could you please fix it?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions