I searched this forum, stackoverflow, cpp reference etc. but could not find a hint.
Is this a compiler setting I can change?
One solution might be to change the compile options, i.e. change the include directory when target is STM32 and renaming one library. But maybe there is a simple inline solution?
Thanks for pointing my in the right direction.
Best
Well; THAT shouldn't need to be there; it should be getting defined for you by the compiler/etc.
PlatformIO is supposed to be aggressively multi-platform - are you sure you're building what you think you're building?
Thanks for your replies.
That sounds like a I'm mistaken and the observed compiler behavior has nothing to do with Arduino "compiler magic". Moreover, I derive from your questions it is not C++ specific either. Hence, I'll head over to PIO to discuss it there.
westfw:
#define __AVR_ATmega328__
Well; THAT shouldn't need to be there; it should be getting defined for you by the compiler/etc.