Typical compiler option formats are:
|
The following typographical conventions are used when describing the individual options:
|
Brackets, pipe, and ellipsis are meta-characters used in the descriptions of the options and are not part of the options themselves.
Some general guidelines for options are:
–lx is the option to link with library libx.a. It is always safer to put -lx after the list of file names to insure the order libraries are searched.
In general, processing of the compiler options is from left to right, allowing selective overriding of macro options (options that include other options). This rule does not apply to linker options. However, some options, -I, -L, and -R for example, accumulate values rather than override previous values when repeated on the same command line.
In an optional list of choices, such as -xhasc[={yes|no}], the first choice listed is the value assumed when the option flag appears on the command line without a value. For example, -xhasc is equivalent to -xhasc=yes.
Source files, object files, and libraries are compiled and linked in the order in which they appear on the command line.