-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when compiling example #013 on Arduino IDE 2.3.4 #240
Comments
Can you try the fixes mentioned in this issue. |
I'm sorry, but I don't know what I need to do to fix it. Can you be more specific about how to do it:
Another question, is this error expected even though all the library's versions are correct? It will be fixed by Thingsboard on another update? |
First of all you need to update the library to the newest release to fix the latter errors. So upgrade to To fix the first error, this is not an issue with this library but with the This is not done by the There is also already an issue for this so I would recommend pinging on this issue so it might get more attention, so it will be fixed as soon as possible. The Pull Request that fixes it has also already been created on the library but not yet merged. Until it is fixed for sure you can use the aforementioned workaround which is writing a simple implementation of that method in the actual ArduinoHTTPClient library code that simply does nothing so simply add this method to the class. int connect(const char *host, uint16_t port, int32_t timeout) override {
// Do nothing, simple stub to fix issues with interface.
} |
Hi.
I'm trying to compile example #13 for ESP32 Dev Module, without changing anything. Below are the compiled messages and errors. Would anyone be able to help?
`In file included from c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_HTTP_Client.cpp:2:
c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_HTTP_Client.h:46:16: error: cannot declare field 'Arduino_HTTP_Client::m_http_client' to be of abstract type 'HttpClient'
46 | HttpClient m_http_client; // Underlying HTTP client instance used to send data
| ^~~~~~~~~~~~~
In file included from c:\Users\Gabriel\Documents\Arduino\libraries\ArduinoHttpClient\src/ArduinoHttpClient.h:8,
from c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_HTTP_Client.h:10:
c:\Users\Gabriel\Documents\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h:41:7: note: because the following virtual functions are pure within 'HttpClient':
41 | class HttpClient : public Client
| ^~~~~~~~~~
In file included from C:\Users\Gabriel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0\cores\esp32/Arduino.h:197,
from c:\Users\Gabriel\Documents\Arduino\libraries\ArduinoHttpClient\src/HttpClient.h:8:
C:\Users\Gabriel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0\cores\esp32/Client.h:29:15: note: 'virtual int Client::connect(IPAddress, uint16_t, int32_t)'
29 | virtual int connect(IPAddress ip, uint16_t port, int32_t timeout) = 0;
| ^~~~~~~
C:\Users\Gabriel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0\cores\esp32/Client.h:31:15: note: 'virtual int Client::connect(const char*, uint16_t, int32_t)'
31 | virtual int connect(const char *host, uint16_t port, int32_t timeout) = 0;
| ^~~~~~~
c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.cpp: In member function 'virtual bool Arduino_MQTT_Client::set_buffer_size(uint16_t, uint16_t)':
c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.cpp:26:39: error: no matching function for call to 'PubSubClient::setBufferSize(uint16_t&, uint16_t&)'
26 | return m_mqtt_client.setBufferSize(receive_buffer_size, send_buffer_size);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.h:10,
from c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.cpp:2:
c:\Users\Gabriel\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:142:12: note: candidate: 'boolean PubSubClient::setBufferSize(uint16_t)'
142 | boolean setBufferSize(uint16_t size);
| ^~~~~~~~~~~~~
c:\Users\Gabriel\Documents\Arduino\libraries\PubSubClient\src/PubSubClient.h:142:12: note: candidate expects 1 argument, 2 provided
c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.cpp: In member function 'virtual uint16_t Arduino_MQTT_Client::get_receive_buffer_size()':
c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.cpp:30:26: error: 'class PubSubClient' has no member named 'getReceiveBufferSize'; did you mean 'getBufferSize'?
30 | return m_mqtt_client.getReceiveBufferSize();
| ^~~~~~~~~~~~~~~~~~~~
| getBufferSize
c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.cpp: In member function 'virtual uint16_t Arduino_MQTT_Client::get_send_buffer_size()':
c:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard\src\Arduino_MQTT_Client.cpp:34:26: error: 'class PubSubClient' has no member named 'getSendBufferSize'; did you mean 'getBufferSize'?
34 | return m_mqtt_client.getSendBufferSize();
| ^~~~~~~~~~~~~~~~~
| getBufferSize
Using library WiFi at version 3.1.0 in folder: C:\Users\Gabriel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0\libraries\WiFi
Using library Networking at version 3.1.0 in folder: C:\Users\Gabriel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0\libraries\Network
Using library NetworkClientSecure at version 3.1.0 in folder: C:\Users\Gabriel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0\libraries\NetworkClientSecure
Using library ThingsBoard at version 0.15.0 in folder: C:\Users\Gabriel\Documents\Arduino\libraries\ThingsBoard
Using library ArduinoJson at version 6.21.4 in folder: C:\Users\Gabriel\Documents\Arduino\libraries\ArduinoJson
Using library PubSubClient at version 2.8 in folder: C:\Users\Gabriel\Documents\Arduino\libraries\PubSubClient
Using library Update at version 3.1.0 in folder: C:\Users\Gabriel\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.0\libraries\Update
Using library ArduinoHttpClient at version 0.6.1 in folder: C:\Users\Gabriel\Documents\Arduino\libraries\ArduinoHttpClient
exit status 1
`
The text was updated successfully, but these errors were encountered: