mlesniew / PicoMQTT

ESP MQTT client and broker library
GNU Lesser General Public License v3.0
255 stars 28 forks source link

Not a single example working? #3

Closed JFRosado closed 1 year ago

JFRosado commented 1 year ago

This looks like a nice library, if a single example worked. But none seems to work. Tryed both esp8266 and esp32 and allways get errors:

D:\Documents\Arduino\libraries\PicoMQTT\src\PicoMQTT\connection.cpp: In member function 'virtual void PicoMQTT::Connection::on_timeout()': D:\Documents\Arduino\libraries\PicoMQTT\src\PicoMQTT\connection.cpp:32:12: error: 'class PicoMQTT::ClientWrapper' has no member named 'abort' client.abort();

In file included from D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT/connection.h:9:0, from D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT/client.h:5, from D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT.h:3, from D:\Documents\Arduino\libraries\PicoMQTT\examples\server_local_pubsub\server_local_pubsub.ino:1: D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT/outgoing_packet.h:39:22: error: 'virtual void PicoMQTT::OutgoingPacket::flush()' marked 'override', but does not override virtual void flush() override; ^

mlesniew commented 1 year ago

All examples compile fine in the CI.

Please make sure that you're using the latest version (0.3.1). Version 0.3.0 did not compile on Windows.

Also, make sure that you have a recent version of the board core installed. In case of ESP8266 you need Arduino core version 3.1 or later.

JFRosado commented 1 year ago

Hi: Using the latest version (0.3.1). Updated core of esp8266 and it compiles.

ESP32 is latest and still no go:

In file included from D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT/connection.h:9:0, from D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT/client.h:5, from D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT.h:3, from D:\Documents\Arduino\libraries\PicoMQTT\examples\server_local_pubsub\server_local_pubsub.ino:1: D:\Documents\Arduino\libraries\PicoMQTT\src/PicoMQTT/outgoing_packet.h:39:22: error: 'virtual void PicoMQTT::OutgoingPacket::flush()' marked 'override', but does not override virtual void flush() override; ^

mlesniew commented 1 year ago

What is the exact ESP32 core version that you have installed?

JFRosado commented 1 year ago

Version 1.0.6

mlesniew commented 1 year ago

The latest version is 2.0.7, see https://github.com/espressif/arduino-esp32/releases. Please try upgrading.

JFRosado commented 1 year ago

I'm going to try to update. In my ide the latest that appears is 1.0.6.

Thanks for all the help. I think you can close this ticket

mlesniew commented 1 year ago

I released version 0.3.2 now, which should produce a clear error message if the library is used with an older core.