M5Core2 icon indicating copy to clipboard operation
M5Core2 copied to clipboard

error: conflicting declaration 'using EncodeRange = struct lgfx::v1::EncodeRange' using EncodeRange = lgfx::EncodeRange;

Open GavinBeattie opened this issue 2 years ago • 3 comments

Describe the bug

Error on compile in Arduino IDE that wasn't present before, guessing that Arduino auto library update triggered issue. Traced as far as: #include <M5Core2.h> // No error with M5Unified.h

Error msg: In file included from /Users/.../Documents/Arduino/core2-base-iot/core2-base-iot.ino:4: /Users/.../Documents/Arduino/libraries/M5GFX/src/M5GFX.h:263:38: error: conflicting declaration 'using EncodeRange = struct lgfx::v1::EncodeRange' using EncodeRange = lgfx::EncodeRange; ^ In file included from /Users/.../Documents/Arduino/libraries/M5Core2/src/utility/In_eSPI.h:480, from /Users/.../Documents/Arduino/libraries/M5Core2/src/M5Display.h:10, from /Users/.../Documents/Arduino/libraries/M5Core2/src/M5Core2.h:12, from /Users/.../Documents/Arduino/core2-base-iot/core2-base-iot.ino:3: /Users/.../Documents/Arduino/libraries/M5Core2/src/Fonts/GFXFF/gfxfont.h:26:3: note: previous declaration as 'typedef struct EncodeRange EncodeRange' } EncodeRange; ^~~~~~~~~~~

To reproduce

Error on compile that wasn't present before, guessing that Arduino auto library update triggered issue. #include <M5Core2.h> // No error with M5Unified.h

In file included from /Users/.../Documents/Arduino/core2-base-iot/core2-base-iot.ino:4: /Users/gavinbeattie/Documents/Arduino/libraries/M5GFX/src/M5GFX.h:263:38: error: conflicting declaration 'using EncodeRange = struct lgfx::v1::EncodeRange' using EncodeRange = lgfx::EncodeRange; ^ In file included from /Users/gavinbeattie/Documents/Arduino/libraries/M5Core2/src/utility/In_eSPI.h:480, from /Users/gavinbeattie/Documents/Arduino/libraries/M5Core2/src/M5Display.h:10, from /Users/gavinbeattie/Documents/Arduino/libraries/M5Core2/src/M5Core2.h:12, from /Users/gavinbeattie/Documents/Arduino/core2-base-iot/core2-base-iot.ino:3: /Users/gavinbeattie/Documents/Arduino/libraries/M5Core2/src/Fonts/GFXFF/gfxfont.h:26:3: note: previous declaration as 'typedef struct EncodeRange EncodeRange' } EncodeRange; ^~~~~~~~~~~

Expected behavior

No errors

Screenshots

No response

Environment

  • OS: macOS
  • IDE &IDE Version: Arduino IDE
  • Repository Version:

Additional context

No response

Issue checklist

  • [X] I searched for previous reports in the issue tracker
  • [X] My report contains all necessary details

GavinBeattie avatar Nov 02 '23 12:11 GavinBeattie

Exactly the same error here:

Environment #1 OS: macOS IDE &IDE Version: PlaformIO Core 6.1.11

Environment #2 OS: macOS IDE &IDE Version: Arduino IDE Latest

Environment #3 OS: Windows 11 IDE &IDE Version: PlaformIO Core 6.1.11

andrea-casalicchio-crs avatar Dec 06 '23 15:12 andrea-casalicchio-crs

Environment that is possible to compile: libraries' versions: M5Core2-v0.1.3 and M5GFX-v0.1.8 OS:Windows 10 IDE&IDE Version:Arduino-v2.0.0 Man those versions are are all too old!

Clement-HU avatar Feb 19 '24 00:02 Clement-HU

So newer versions seem to be buggier?

Clement-HU avatar Feb 19 '24 00:02 Clement-HU

@GavinBeattie I installed M5Core2 0.1.9 and no errors were encountered during compilation. Please provide test code.

lbuque avatar May 24 '24 08:05 lbuque