[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

# 7. Command Line Options supported by GNU Pascal.

GPC is a command-line compiler, i.e., to compile a program you have to invoke ``gpc'` passing it the name of the file you want to compile, plus options.

GPC supports all command-line options that GCC knows. For a complete reference and descriptions of all options, see section `GCC Command Options' in the GCC Manual. Below, you will find a list of the additional options that GPC supports, and a list of GPC's most important options (including some of those supported by GCC as well).

You can mix options and file names on the command line. For the most part, the order doesn't matter. Order does matter, e.g., when you use several options of the same kind; for example, if you specify ``-L'` more than once, the directories are searched in the order specified. Note: Since many options have multiletter names; multiple single-letter options may not be grouped as is possible with many other programs: ``-dr'` is very different from ``-d -r'`.

Many options have long names starting with ``--'` or, completely equivalent ``-f'`. E.g., ``--mixed-comments'` is the same as ``-fmixed-comments'`. Some options tell GPC when to give warnings, i.e. diagnostic messages that report constructs which are not inherently erroneous but which are risky or suggest there may have been an error. Those options start with ``-W'`.

Most GPC specific options can also be changed during one compilation by using compiler directives in the source, e.g. ``{$X+}'` or ``{$extended-syntax}'` for ``--extended-syntax'` (see section 8.9 Compiler Directives And The Preprocessor).

GPC understands the same environment variables GCC does (see section `Environment Variables Affecting GCC' in the GCC manual). In addition, GPC recognizes ``GPC_EXEC_PREFIX'` with the same meaning that ``GCC_EXEC_PREFIX'` has to GCC. GPC also recognizes ``GCC_EXEC_PREFIX'`, but ``GPC_EXEC_PREFIX'` takes precedence.

Some of the long options (e.g., ``--unit-path'`) take an argument. This argument is separated with a ``='` sign, e.g.:

    --unit-path=/home/foo/units

> GPC Command Line Options | GPC options besides those of GCC.
> GPC Options | The most commonly used options to GPC.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html