I'm trying to implement the MQTT protocol inside an ESP32-TUX instance.
I enabled MQTT configuration inside idf.py menuconfig.
main.hpp I put the include of the local file for the mqtt library downloaded from Github (https://github.com/espressif/esp-mqtt) because that way it didn't give error of include not found.
main.hpp include mqtt_client.h file. I initialized the functions: mqtt_event_handler() and mqtt_app_start().
main.cpp I placed the respective functions from the previous step and initialized mqtt_app_start().
It happens that when compiling it gives an error inside the mqtt_client.h library, as shown in the image below.
I wonder if anyone has an idea of how to make it work or an example of working MQTT (connect, subscribe, publish) code.
I'm trying to implement the MQTT protocol inside an ESP32-TUX instance.
I enabled MQTT configuration inside idf.py menuconfig.
main.hpp I put the include of the local file for the mqtt library downloaded from Github (https://github.com/espressif/esp-mqtt) because that way it didn't give error of include not found.
main.hpp include mqtt_client.h file. I initialized the functions: mqtt_event_handler() and mqtt_app_start().
main.cpp I placed the respective functions from the previous step and initialized mqtt_app_start().
It happens that when compiling it gives an error inside the mqtt_client.h library, as shown in the image below.
I wonder if anyone has an idea of how to make it work or an example of working MQTT (connect, subscribe, publish) code.
Thanks!