Arduino IDE 1.8.19 or 2.3.2
MegunoLink@1.42
MPL version 1.37.24.151.530
I compiled the ESP32 example sketch BlinkRGB.ino using ESP32 board definitions. This compiled OK.
I then added : #include <MegunoLink.h> but no additional code.
The compiler returns (repeat info removed):
In file included from ...\Documents\Arduino\libraries\MegunoLink\src\CommandDispatcherBase.cpp:1:
...\Documents\Arduino\libraries\MegunoLink\src\CommandDispatcherBase.h:61:10: error: 'bool MLP::CommandDispatcherBase::AddVariable(const __FlashStringHelper*, long unsigned int&)' cannot be overloaded with 'bool MLP::CommandDispatcherBase::AddVariable(const __FlashStringHelper*, uint32_t&)'
61 | bool AddVariable(const __FlashStringHelper* pName, unsigned long& rVariable);
...\Documents\Arduino\libraries\MegunoLink\src\CommandDispatcherBase.cpp:57:6: error: redefinition of 'bool MLP::CommandDispatcherBase::AddVariable(const __FlashStringHelper*, long unsigned int&)'
57 | bool CommandDispatcherBase::AddVariable(const __FlashStringHelper* pName, unsigned long& rVariable)
I see the same error with my own code that compiles with the AVR boards, but not modified versions for the ESP32 board definitions.
I saved the verbose compiler output to add here, but the attachments were refused! (Invalid file extension txt or docx) That's life... BR, Nick.
Compile error with ESP32 board definition
Initial solution found:
There are two board managers available.
https://github.com/espressif/arduino-esp32 in the Arduino IDE as ESP32 by Espressif systems.
The Arduino board manager in the Arduino IDE as Arduino ESP32 boards by Arduino.
The latest version from Espressif Systems is V3.0.4 : This did not work.
The latest update from version 2 was V2.0.17 : This worked for me.
I found a reference to problems with V3 here:
https://forum.arduino.cc/t/compilation- ... /1284423/9
To check the different versions I set up a sketch for the Arduino NANO including the #include <MegunoLink.h> header.
The same code can be checked with the AVR, Arduino ESP32 and Espressif ESP32 board versions, without change. Once this worked for the NANO board, the Espressif board definitions compiled for generic ESP32 boards.
There are two board managers available.
https://github.com/espressif/arduino-esp32 in the Arduino IDE as ESP32 by Espressif systems.
The Arduino board manager in the Arduino IDE as Arduino ESP32 boards by Arduino.
The latest version from Espressif Systems is V3.0.4 : This did not work.
The latest update from version 2 was V2.0.17 : This worked for me.
I found a reference to problems with V3 here:
https://forum.arduino.cc/t/compilation- ... /1284423/9
To check the different versions I set up a sketch for the Arduino NANO including the #include <MegunoLink.h> header.
The same code can be checked with the AVR, Arduino ESP32 and Espressif ESP32 board versions, without change. Once this worked for the NANO board, the Espressif board definitions compiled for generic ESP32 boards.