Compile error with ESP32 board definition
Posted: Tue Sep 10, 2024 2:14 pm
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.
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.