1

I've been looking to modify the build flags under Arduino's IDE 1.x, or even the Arduino CLI (which I haven't used but am willing to adopt) such that I can undefine -std=gnu++11 and instead define -std=gnu++14

I found a question related to this which gives me almost what I need:

Arduino 1.0.6: How to change compiler flag?

But it only shows how to add flags, not to remove them. I found another related post about changing arduino to GNU C++17 but the answer was it's not possible.

In this case, I know it's possible, as I do it in Platform IO in order to use the htcw_gfx library. It works great on most platforms that will run GFX reasonably anyway.

But I just don't know how to fiddle with Arduino to get it to dance the way I need to.

Any help would be greatly appreciated.

  • You didn't say which version of the Arduino IDE you're using. I assume latest 1.x since you chased a link for 1.x – lurker Apr 03 '22 at 18:23
  • Thanks! I edited. I totally forgot there's a new version of the IDE. To be honest I use platformIO but i write libs and some of them require C++14 so I'm trying to figure this out so i can help people use what I wrote from Arduino IDE instead of just PIO – honey the codewitch Apr 03 '22 at 19:46
  • Yeah I would think somewhere in the bowels of the arduino-cli tools there's an actual call to a compiler with options. You might be able to modify it at that level. But from what I've read, out of the box, the Arduino development tools are fairly restrictive, maintaining a very controlled development environment which is convenient for hobbyists who mostly dabble in C/C++ programming. – lurker Apr 03 '22 at 20:52

0 Answers0