O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Even More Compiler Flags

gcc has always had a lot of command-line flags that can control many aspects of the compiler, such as the dialect of the language being compiled, the manipulations performed on the resulting object code, and controlling what warnings are emitted.

In Xcode, you can pass these flags to the compiler by setting the Other C Flags (for optimization and other general flags) and Other Warning Flags (for flags related to warnings) in the target inspector. The warning flags are placed before the other C flags in case there is an order dependency between a set of flags.

Here are some flags that might be of interest to you:

-Wno-protocol

This flag makes Objective-C’s @protocol feature more useful in some circumstances. The default ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required