This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

It would be really nice if the SDK had define guards around MIN

I'm using a library that does

#ifndef MIN

#define MIN stuff

#endif

Because I'm using segger, I have no control over compilation order, so that's getting loaded first, and defining MIN.

This makes components/libraries/util/nordic_common.h unhappy, as it just defines MIN without checking if it's already defined.

This is true of 16.0.0 and 17.0.2.

I've modified my local copy, but it would be really nice if in the next release there were define guards.

Related