As I understand it, the binary tools a project uses to build are defined by the PATH (normally a USER CONFIG environment setting) in the properties. We can manage any differences here by checking __GNUC__ as normal.
Yet the ARM libraries etc seem to be defined by the MCUXpresso IDE itself. For example, when building under MCUXpresso 11.1.0, our build requires int errno; to be instantiated: but under MCUXpresso 11.6.1, this yields a duplicate symbol error in the link stage.
Is there any direct way code can determine which version of MCUXpresso it is running inside? The only way I can see was to (e.g.) add a small header file in the ide/ directory of each IDE and add ECLIPSE_HOME as an include path, but that's not really very nice.
Thanks!
if you really want to know which IDE is used, then I would use that include way too.
The compiler can be identified with __GNUC__, but this one is really independent of the IDE running.
The thing with errno sounds like a library thing: there are macros (https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html), but this is for the glibc only, not for newlib or newlib-nano afik.