I want to set GCC_PREPROCESSOR_DEFINITIONS
for each of my four build configurations (Debug, Release, Ad Hoc, and Distribution.) I'd like to have a different setting for each.
The screen I'm looking at is the Target Info window's "Build" tab. When I set the Configuration pop-up to "Debug" I can see my GCC_PREPROCESSOR_DEFINITIONS
setting there. When I switch to "Release," or any of the other configurations, it's no longer visible. Yet when I try to add it to those configurations, it says GCC_PREPROCESSOR_DEFINITIONS
already exists, and that I can't add it again.
As I said, I want to have a different setting for my various builds. How can I accomplish this?
Thanks very much.
You can change it easily. On the top menu click on your project name. In my case, it's BuildVersion (the name of the project). On the left panel select Run and change Build Configuration to Release.
DSTROOT (Installation Build Products Location) Identifies the directory into which the product is placed. In this directory, the product is laid out exactly as it would be installed in a user's filesystem.
Preprocessor Macros are directives executed by the compiler, so they're not part of Objective C. We've used them many times before with the #import statement. But to stay with our Lite and Pro example: you can use a Preprocessor if/then statement to check which version is being compiled.
OTHER_CFLAGS if I understood the question right. And pass your defines like -DDEBUG
or something.
And yes, if you need to assign a value to a macro, you could do something like this - '-DSOME_MESSAGE=@"Hello, World!"'
.
Note ' symbols around - they are required. SOME_MESSAGE macro will be defined with @"Hello, World!" value.
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