Skip to Content
Objective-C Pocket Reference
book

Objective-C Pocket Reference

by Andrew Duncan
December 2002
Beginner content levelBeginner
128 pages
3h 10m
English
O'Reilly Media, Inc.
Content preview from Objective-C Pocket Reference

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= ClassName

Tells the compiler to create an instance of ClassName for each string literal expressed with the @"string" directive. For the GNU runtime, the default class is NXConstantString; for Cocoa it is NSConstantString.

-fgnu-runtime

Generate code for linking with the standard GNU Objective-C runtime. This is the default option for most gcc installations.

-fnext-runtime

Generate code for linking with the NeXT runtime. This is the default option for Darwin.

-gen-decls

Write all interface declarations the compiler sees to a file named sourcename.decl.

-Wno-protocol

Do not warn if methods required by a protocol are not implemented in the class adopting it.

-Wselector

Warn 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.
Start your free trial

You might also like

Pro Objective-C

Pro Objective-C

Keith Lee
Learning Cocoa with Objective-C, 4th Edition

Learning Cocoa with Objective-C, 4th Edition

Paris Buttfield-Addison, Jonathon Manning, Tim Nugent

Publisher Resources

ISBN: 0596004230Errata Page