lcdgfx
lcdgfx copied to clipboard
Error compiling for ESP32 after upgrading ESP32 platform from 1.0.6 to 2.0.5
Describe the bug
miniThrottle compiles OK when using Arduino ESP platform 1.0.6
When compiling miniThrottle model train control using ESP32 platform version 2.0.5, the compile fails with: /home/ubuntu/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/xtensa-esp32-elf/include/c++/8.4.0/bits/stl_vector.h: In member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::_M_check_len(std::vector<_Tp, _Alloc>::size_type, const char*) const': /home/ubuntu/Arduino/libraries/lcdgfx/src/nano_gfx_types.h:41:18: error: expected unqualified-id before '(' token #define max(a,b) ((a) > (b) ? (a) : (b))
To Reproduce Steps to reproduce the behavior: Compiled using arduino-cli on Ubuntu, In ~/.arduino15/arduino-cli.yaml , the board manager is set to
board_manager: additional_urls:
- https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Otherwise, config of Arduino CLI is similar to that described at https://conferre.cf/HydraFerret/cli.php
To get code to compile with platform2, commented out the following two lines: /home/ubuntu/Arduino/libraries/lcdgfx/src/nano_gfx_types.h (line 41) /home/ubuntu/Arduino/libraries/lcdgfx/src/v2/lcd/base/ssd1306_common.inl (line 673)
Expected behavior Compilation without error.
Screenshots Some discussion around the bug in the context of lcdgfx: https://github.com/enfieldcat/ESP32_miniThrottle/issues
Please complete the following information:
- library version 1.1.4
- LCD display type
- linux
- Platform esp32
- Ardiono-cli platform 2.0.5
Additional context Add any other context about the problem here.
Can you try the latest master branch. I cannot reproduce the issue using latest Arduino IDE, ESP32 Platform package and latest mainline