I'm using XCode 4, and in my project build settings, I've set :
Preprocessor macros
Debug DEBUG;FULL
Release FULL
and in another target of the same project :
Preprocessor macros
Debug DEBUG;LITE
Release LITE
The two targets are using exactly the same files, except the plist info file that is made distinct.
Then later in my code, I wrote :
#ifdef FULL
// ###### FULL VERSION
NSLog(@"test");
// ######
#endif
But the log is never written.
What am I doing wrong ? I don't want (need) to set a value to the FULL statement.
Multiple preprocessor macros are separated by spaces not semicolon. So it should be:
Preprocessor macros
Debug DEBUG FULL
Release FULL
With the semicolon, you're defining a single macro called "DEBUG;FULL". And that won't match your #ifdef
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With