Imroy / pubsubclient

A client library for the ESP8266 that provides support for MQTT
MIT License
435 stars 115 forks source link

error "MQTT' does not name a type" when compiling ESP8266-OTA example #90

Closed dpapdpap closed 4 years ago

dpapdpap commented 4 years ago

Hi, I want to try your sketch to update the firmware of an ESP8266 using OTA+MQTT, but when i compile it it raises the error

ESP8266-OTA:35:24: error: 'MQTT' does not name a type void receive_ota(const MQTT::Publish& pub) { ^ ESP8266-OTA:35:37: error: expected unqualified-id before '&' token

Yes, I read the comments in similar question (must install the correct PubSubClient library) but I can't manage it. I installed the pacage manually (sketch/include library/add zip etc). Then I open the examples under the tittle "PubSubClient(Imroy) and I have the error. How can I force to use its own library instead of the Adafruit's , please ?

dpapdpap commented 4 years ago

ok. I deleted the other package and now it compiles ok. But another issue appeared (I'll open a new issue for this)