I haven’t had a need to use preprocessor macros much before, and came across this bit of code on the web:
#ifndef LITE_VERSION
#ifndef FULL_VERSION
#error
#endif
#endif
The goal of this is to warn if either LITE or FULL is not declared. I’ve dropped this in my Prefix.pch file and I receive a warning with the #error statement.
I tried changing the error to:
#pragma message("some text")
And while this will compile, no text is displayed (that I can see).
I’ve not declared the LITE or FULL yet, so I’m wondering why this doesn’t work.
This should be:
Or you could use this if you prefer:
See http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html
Typically I use a slightly different approach: