Page 1 of 1

Compiler error with latest release.

Posted: 08 Jan 2019, 13:08
by EddyG
I am using Arduine IDE 1.8.8
The clean install of version "ESPEasy_mega-20181220" compiles fine. (And all previous versions did)
The clean install of version "ESPEasy_mega-20190108" gives errors.
The offending code is in ESPEasy-Globals.h

Code: Select all

String getUnknownString();
and in "Misc.ino"

Code: Select all

String getUnknownString() { return F("Unknown"); }
How can I solve that? If I uncomment one or the other I get other compile errors.

The compile errors started with the switch from "ESPEasySoftwareSerial" to "ESPEasySerial" because "ESPEasy_mega-20181231" complies fine too.

Re: Compiler error with latest release.

Posted: 08 Jan 2019, 17:49
by EddyG
The "static" in ESPEasy-Globals.h solved the error, but now I get other errors in the Arduino IDE.

Code: Select all

_Plugin_Helper_serial:3:47: error: 'ESPeasySerialType' has not been declared

 static String serialHelper_getSerialTypeLabel(ESPeasySerialType::serialtype serType) {

                                               ^

_Plugin_Helper_serial:30:1: error: 'ESPeasySerialType' does not name a type

 ESPeasySerialType::serialtype serialHelper_getSerialType(struct EventStruct *event) {

 ^

C:\Users\Eddy\Documents\Arduino\ESPEasy\_Plugin_Helper_serial.ino: In function 'String serialHelper_getSerialTypeLabel(ESPeasySerialType::serialtype)':

_Plugin_Helper_serial:3:84: error: 'String serialHelper_getSerialTypeLabel(ESPeasySerialType::serialtype)' redeclared as different kind of symbol

 static String serialHelper_getSerialTypeLabel(ESPeasySerialType::serialtype serType) {

                                                                                    ^

_Plugin_Helper_serial:3:15: error: previous declaration of 'String serialHelper_getSerialTypeLabel'

 static String serialHelper_getSerialTypeLabel(ESPeasySerialType::serialtype serType) {

               ^

C:\Users\Eddy\Documents\Arduino\ESPEasy\_Plugin_Helper_serial.ino: In function 'void serialHelper_webformLoad(EventStruct*)':

_Plugin_Helper_serial:49:55: error: no match for call to '(String) (ESPeasySerialType::serialtype&)'

       option = serialHelper_getSerialTypeLabel(serType);

                                                       ^

Multiple libraries were found for "Servo.h"
 Used: C:\Users\Eddy\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\Servo
 Not used: C:\Program Files (x86)\Arduino\libraries\Servo
exit status 1
'ESPeasySerialType' has not been declared
Hope that can be solved too.

Re: Compiler error with latest release.

Posted: 08 Jan 2019, 18:12
by grovkillen
Have you downloaded today's code base? TD-er applied a fix...

Re: Compiler error with latest release.

Posted: 08 Jan 2019, 19:36
by EddyG
I saw on GitHub what the little change in "ESPEasy-Globals.h"was (static) and I applied that manually.
So the first error is gone, but I got other errors back. See above.

Re: Compiler error with latest release.

Posted: 08 Jan 2019, 20:04
by grovkillen
Ok, we're officially using PlatformIO on Atom. Sorry for not being able to help more.

Re: Compiler error with latest release.

Posted: 08 Jan 2019, 21:17
by EddyG
Pitty, but I still hope that TD-er can solve this error too.

Re: Compiler error with latest release.

Posted: 09 Jan 2019, 00:59
by ltrpv
I managed to work-around this issue by including the espeasyserial.h in the global.h, so it gets included sooner. Probably a dependency-loop somewhere.

Re: Compiler error with latest release.

Posted: 09 Jan 2019, 14:06
by EddyG
Could you tell where you included the ESPeasySerial.h
Because I included it but got other errors instead.

Re: Compiler error with latest release.

Posted: 09 Jan 2019, 14:22
by EddyG
Found it!
I include the ESPeasySerial.h at the end of my Custom.h
That did the trick.

Re: Compiler error with latest release.

Posted: 10 Jan 2019, 15:39
by pitrio
dear all,
I also have the same problem during compile Espeasy with Arduino IDE.
thank you in advance if you can solve it!

ricc