Node: Objective-C Dialect Options, Next: , Previous: C++ Dialect Options, Up: Invoking GCC

Options Controlling Objective-C Dialect

This section describes the command-line options that are only meaningful for Objective-C programs; but you can also use most of the GNU compiler options regardless of what language your program is in. For example, you might compile a file some_class.m like this:

     gcc -g -fgnu-runtime -O -c some_class.m

In this example, only -fgnu-runtime is an option meant only for Objective-C programs; you can use the other options with any language supported by GCC.

Here is a list of options that are only for compiling Objective-C programs:

Use class-name as the name of the class to instantiate for each literal string specified with the syntax @"...". The default class name is NXConstantString.
Generate object code compatible with the standard GNU Objective-C runtime. This is the default for most types of systems.
Generate output compatible with the NeXT runtime. This is the default for NeXT-based systems, including Darwin and Mac OS X.
Dump interface declarations for all classes seen in the source file to a file named sourcename.decl.
Do not warn if methods required by a protocol are not implemented in the class adopting it.
Warn if a selector has multiple methods of different types defined.