Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Andrey Fedorov
#80281 Hello, colleagues,

I've met with the strange thing. I created some sketch with ArduinoJSON v.6.
I created a function
Code: Select allvoid printResult(JsonObject res)
{

}


and after compilation I got the error:
[hr]Arduino: 1.8.8 (Windows 10), Board: "WeMos D1 R1, 160 MHz, Flash, Enabled, 4M (1M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 921600"

ModbusConfig:180:18: error: variable or field 'printResult' declared void
ModbusConfig:180:18: error: 'JsonObject' was not declared in this scope[hr]

but if I Invoke JsonObject in any function it works without any problem. E.g.:
Code: Select allvoid printResult()
{
  JsonObject res;
}


compiled successfully. I don't understand what's a problem.