Code Monkey home page Code Monkey logo

Comments (3)

walduino avatar walduino commented on July 25, 2024

https://raw.githubusercontent.com/tuanpmt/espduino/master/espduino/examples/rest/rest.ino
builds just fine for me ;
However
I can reproduce the error when I include both MQTT.H and REST.H in one arduino sketch

from espduino.

bong0 avatar bong0 commented on July 25, 2024

Same issue here. @walduino do you use windows or any fs which is not case sensitive?

Using library SoftwareSerial in folder: /home/bongo/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/libraries/SoftwareSerial 
Using library espduino in folder: /home/bongo/Arduino/libraries/espduino (legacy)

/home/bongo/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -I/home/bongo/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/tools/sdk/include -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10604 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DESP8266 -I/home/bongo/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/cores/esp8266 -I/home/bongo/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/variants/generic -I/home/bongo/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/libraries/SoftwareSerial -I/home/bongo/Arduino/libraries/espduino -I/home/bongo/Arduino/libraries/disabled /tmp/build6512057098156652910.tmp/sketch_mar19a.cpp -o /tmp/build6512057098156652910.tmp/sketch_mar19a.cpp.o 
In file included from sketch_mar19a.ino:10:0:
/home/bongo/Arduino/libraries/espduino/rest.h:30:3: error: 'ESP' does not name a type
   ESP *esp;
   ^
/home/bongo/Arduino/libraries/espduino/rest.h:38:12: error: expected ')' before '*' token
   REST(ESP *e);
            ^
sketch_mar19a.ino:14:1: error: 'ESP' does not name a type
sketch_mar19a.ino:16:12: error: 'esp' was not declared in this scope
sketch_mar19a.ino: In function 'void setup()':
sketch_mar19a.ino:41:3: error: 'esp' was not declared in this scope
sketch_mar19a.ino: In function 'void loop()':
sketch_mar19a.ino:62:3: error: 'esp' was not declared in this scope
'ESP' does not name a type

I can't see any reason for this behaviour despite looking at it for hours...

from espduino.

chenhy82 avatar chenhy82 commented on July 25, 2024

I got the same error...

In file included from E:\Arduino\projects\MQTTDemo\MQTTDemo.ino:3:0:
E:\Arduino\projects\libraries\espduino/mqtt.h:18:3: error: 'ESP' does not name a type
ESP esp;
^
E:\Arduino\projects\libraries\espduino/mqtt.h:27:12: error: expected ')' before '
' token
MQTT(ESP esp);
^
MQTTDemo:7: error: 'ESP' does not name a type
ESP esp(&Serial, &debugPort, 13);
^
E:\Arduino\projects\MQTTDemo\MQTTDemo.ino: In function 'void wifiCb(uint8_t)':
MQTTDemo:13: error: 'esp' was not declared in this scope
esp.mqttConnect("mqtt.domain.io", 1880);
^
E:\Arduino\projects\MQTTDemo\MQTTDemo.ino: In function 'void mqttConnected(uint32_t
)':
MQTTDemo:19: error: 'esp' was not declared in this scope
esp.subscribe("/topic");
^
E:\Arduino\projects\MQTTDemo\MQTTDemo.ino: In function 'void mqttData(uint32_t*)':
MQTTDemo:34: error: 'mqtt_event_data_t' was not declared in this scope
mqtt_event_data_t *event_data = (mqtt_event_data_t *)args;
^
MQTTDemo:34: error: 'event_data' was not declared in this scope
mqtt_event_data_t *event_data = (mqtt_event_data_t *)args;
^
MQTTDemo:34: error: expected primary-expression before ')' token
mqtt_event_data_t *event_data = (mqtt_event_data_t *)args;
^
MQTTDemo:34: error: expected ';' before 'args'
mqtt_event_data_t *event_data = (mqtt_event_data_t *)args;
^
E:\Arduino\projects\MQTTDemo\MQTTDemo.ino: In function 'void setup()':
MQTTDemo:59: error: 'esp' was not declared in this scope
esp.wifiCb.attach(&wifiCb);
^
E:\Arduino\projects\MQTTDemo\MQTTDemo.ino: In function 'void loop()':
MQTTDemo:73: error: 'esp' was not declared in this scope
esp.process();

from espduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.