Closed GotRobbd closed 1 month ago
The following fields are missing: Description, Steps to Reproduce, Expected Behavior, Actual Behavior, Environment, IDE. Please update the issue with this information.
Hi @GotRobbd About to make 1.3.1 release - please try it. Should fix both PlatformIO and Arduino IDE for both 2.0.17 and 3.0.2
Hi @RobertByrnes, @GotRobbd
The error reference to 'byte' is still ambiguous
in the Arduino example regarding the TinyGsm
library. Does anyone have any ideas on how to debug this issue? Should we raise an issue in the arduino-esp32
and TinyGsm
repositories to include information about the ambiguity between the new GCC byte class and Arduino's byte typedef
in the ESP32 migration guide?
Hi @duyle1402 Which version of this lib? 1.3.0
?
I have just released 1.3.1 which should fix this as all the examples for Arduino now compile with esp@3.0.2 - This hasn't appeared in my Arduino IDE yet but as soon as it does! I will test again.
Sorry for the lack of information. I mean the Arduino example using the MQTT
and TinyGsm
libraries. I have see the commit and dont see anychanges regarding mqtt_secure_gsm_SIM7000
example in 1.3.1
Nevermind, sorry for the confusion. I see that you used using namespace std;
in release 1.3.1
. I just tested it again and it works well. Sorry again @RobertByrnes
Hey @duyle1402 No trouble - just glad it is sorted!
I have noticed that people may stumble upon using the library properly when using the latest version of arduino-esp32 (currently at 3.0.3). This has been caused by an external library named ArduinoHttpClient, which fails to build.
This is due to the GCC compiler's byte class and the Arduino's byte typedef clashing with each other, causing ambiguity. This is not an issue when using arduino-esp32 v2.0.17 and lower, however. This problem is arising now because arduino-esp32 v3 is using GCC 12.2.0, whilst arduino-esp32 v2 is using is using GCC 8.4.0. This is important because the former is using the C++17 standard or higher, which introduce the byte class in the language. The latter is still using C++11, which does not have such class.
The problem not only affects ArduinoHttpClient, but any other Arduino library using the byte typedef, including TinyGsm.
The good news is that there is an easy workaround. When opening one of the examples in ArduinoIDE from this library, look for
#include <ArduinoHttpClient.h>
and put it as the first include. This should fix the issue and the code should compile just fine. If it still does not work, try and put it in between the other includes until the code compiles.Original https_wifi example code in ArduinoIDE, fails to compile due to "byte" definition ambiguity:![image](https://github.com/user-attachments/assets/5b6e5628-a3c3-4e76-bf22-4f7d54acbe44)
Modified https_wifi example code in ArduinoIDE, compiles fine:![image](https://github.com/user-attachments/assets/a50f82a9-50a3-4b92-9f24-7c4c2f4ae076)