Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By kas
#42682
allmac wrote:It is there... I already use it for other things.

The sketch is accessing the wrong lib, please search for one (or more) mqtt.h file(s) on your HDD
Could be in
arduino\libraries\
C:\Program Files (x86)\Arduino\
C:\Users\<...>\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\<...>\libraries

- Please confirm Arduino IDE version
- In IDE, go to Menu/tools/board:"generic ESP8266 module"/Boards manager and confirm your package version (mine is 2.1.0-rc2)

Let me know

** Message edited **
User avatar
By kas
#42848 FWIW, I replicated your error messages by using the Knolleary pubsubclient library

MQTT_led_V1.06_posted:42: error: 'MQTT' does not name a type
MQTT_led_V1.06_posted:42: error: expected unqualified-id before '&' token
MQTT_led_V1.06_posted:42: error: expected ')' before '&' token
MQTT_led_V1.06_posted:42: error: expected initializer before 'pub'
no matching function for call to 'PubSubClient::PubSubClient(WiFiClient&, const char*&, const uint16_t&)'


Please use the Imroy pubsubclient library