Closed ghost closed 5 years ago
When compiling a simple sketch in platformio with #include <Arduino.h> the following error comes up:
#include <Arduino.h>
[...]\toolchain-gccarmnoneeabi\arm-none-eabi\include\c++\4.8.4\bits\basic_string.h: In member function 'int std::basic_string<_CharT, _Traits, _Alloc>::compare(const std::basic_string<_CharT, _Traits, _Alloc>&) const': [...]\framework-arduinosam\system\sam\libsam/include/USB_device.h:364:25: error: expected unqualified-id before '(' token #define Min(a, b) (((a) < (b)) ? (a) : (b)) ^
The macro seems perfect and I never use it in my code, so what could have gone wrong?
Could you provide a simple PlatformIO project to reproduce this issue?
It now compiles! Perhaps it's a bug in VS Code?
When compiling a simple sketch in platformio with
#include <Arduino.h>
the following error comes up:The macro seems perfect and I never use it in my code, so what could have gone wrong?