ArduinoCore-mbed icon indicating copy to clipboard operation
ArduinoCore-mbed copied to clipboard

Support for C++17/20

Open Beafantles opened this issue 1 year ago • 2 comments

Hello, I’m trying to build a project for my Raspberry Pi PIco and I was wondering if I could use C++17/20 for it. However, it seems like there are some conflicts with the abs macro. My main.cpp file is completely empty (it just includes Arduino.h header):

#include "Arduino.h"
void setup() {}
void loop() {}

However, when I try to build the project, tons of errors are encountered, the first one being related to abs macro (I believe all other ones are related to that one specific error). Here’s a part of the log below:

image

It seems Arduino.h header redefines abs macro and it conflicts with the stdlib (for C++17/20).

Beafantles avatar Jan 05 '24 16:01 Beafantles

Still not working :C

AgainPsychoX avatar Mar 12 '24 20:03 AgainPsychoX