Compiler Flags
Compiler flags are options you give to gcc when it compiles a file or set of files. You may provide these directly on the command line, or your development tools may generate them when they invoke gcc. This section describes just the flags that are specific to Objective-C.
-fconstant-string-class=ClassNameTells the compiler to create an instance of
ClassNamefor each string literal expressed with the@"string" directive. For the GNU runtime, the default class isNXConstantString; for Cocoa it isNSConstantString.-fgnu-runtimeGenerate code for linking with the standard GNU Objective-C runtime. This is the default option for most gcc installations.
-fnext-runtimeGenerate code for linking with the NeXT runtime. This is the default option for Darwin.
-gen-declsWrite all interface declarations the compiler sees to a file named sourcename.decl.
-Wno-protocolDo not warn if methods required by a protocol are not implemented in the class adopting it.
-WselectorWarn if there are methods with the same name but different signatures.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access