Cannot use C++17/20 with Raspberry Pi Pico (conflicts with abs macro)

Hello, I’m very new to platformIO. 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. Here is my platformio.ini file:

platform = raspberrypi
board = pico
framework = arduino

build_flags =
build_unflags =

My main.cpp is completely empty (it just includes Arduino.h):

#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:

It seems Arduino.h redefines abs macro and it conflicts with the stdlib (for C++17/20).
Would you happen to know whether I can use C++17/20 for my project? If so, how can I achieve that?

Thanks in advance!

Please ask at their issue page to make their code compilable with C++17.

Alright, I added an issue about it on their Github, I’ll update this post accordingly to their answer. :+1: