Hey everyone,
I’m trying to get the spark up and running with the SparkJson library and UDP. My code was working fine until I added this one function:
int doNothing(JsonObject& randomName) {
return 0;
}
Regardless of whether I call it or not, if its above the setup function of below the loop function or anywhere in between, I get a whole bunch of errors that I just can’t seem to figure out. Here are some of the errors:
^
simpleudp.cpp:4:15: error: 'JsonObject' was not declared in this scope
int doNothing(JsonObject& randomName);
^
simpleudp.cpp:4:27: error: 'randomName' was not declared in this scope
int doNothing(JsonObject& randomName);
^
In file included from SparkJson/./ArduinoJson.h:7:0,
from SparkJson/SparkJson.h:13,
from simpleudp.cpp:4:
SparkJson/././DynamicJsonBuffer.h: In destructor 'ArduinoJson::DynamicJsonBuffer::~DynamicJsonBuffer()':
SparkJson/././DynamicJsonBuffer.h:20:33: warning: deleting object of polymorphic class type 'ArduinoJson::DynamicJsonBuffer' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
~DynamicJsonBuffer() { delete _next; }
^
simpleudp.cpp: In function 'int doNothing(ArduinoJson::JsonObject&)':
simpleudp.cpp:43:44: error: 'int doNothing(ArduinoJson::JsonObject&)' redeclared as different kind of symbol
^
simpleudp.cpp:4:5: error: previous declaration of 'int doNothing'
int doNothing(JsonObject& randomName);
^
make: *** [simpleudp.o] Error 1
Any ideas?
Thanks a bunch,
Eric