So it looks like the microcontroller project has just created a new data type and named it bool, which now conflicts with the fact that bool is a keyword (along with true and false)? My suggestions (in order of preference):
Solution 1: Fix the microcontroller project. Do a global search and replace with bool and replace it with something less controversial. Perhaps C_Boolean, C_True and C_False. It is unlikely to cause any future conflicts and is fairly simple to do using regular expressions.
Solution 2: Convert the microcontroller project to C ++. This allows direct use of bool, true and false (as keywords), and you can simply exclude macros. This can be difficult if the microcontroller code uses syntax that is not compatible with C ++.
Solution 3. Do what you have already done. Create a shell that will clear after you enable your microcontroller code. I have code that relies on overriding the extern keyword, and this becomes the only safe way for me. It's fragile, though ... you'll probably have to fix it in the future when something unrelated destroys the include structure.
Also, I'm not sure if the original author thinks that extern "C" wrappers do, but they do not affect the macros defined. You may have cut out some of the things this would have affected, but the macros are not affected by the link builder conventions.
source share