espduino icon indicating copy to clipboard operation
espduino copied to clipboard

Using both REST and MQTT results in error

Open walduino opened this issue 10 years ago • 1 comments

I've been using Tuan's lib with mqtt for a while now with great succes (thanks !!), but now I want to download setting via REST before i setup the mqtt part. When I try to use them both by including both:

#include <mqtt.h> 
#include <rest.h>

and using:

MQTT mqtt(&esp);
REST rest(&esp);

in my code i get build errors (the error differs depending on the order i include them so i'm guessing this is a lib code bug)

code @ https://github.com/walduino/Cheapspark/commit/721d1425a7112aa3f7ae738404e28b46f13a2132

walduino avatar Dec 12 '15 22:12 walduino

#include <espduino.h>
#include <mqtt.h>
#include <rest.h>



ESP esp(&Serial, 4);
MQTT mqtt(&esp);
REST rest(&esp);

main.ino:9:1: error: 'REST' does not name a type

#include <espduino.h>
#include <rest.h>
#include <mqtt.h>




ESP esp(&Serial, 4);
MQTT mqtt(&esp);
REST rest(&esp);

main.ino:9:10: error: variable 'MQTT mqtt' has initializer but incomplete type

walduino avatar Dec 13 '15 00:12 walduino