Invocation - Red Hat ENTERPRISE LINUX 3 - USING CPP Using Instructions

Using cpp, the c preprocessor
Hide thumbs Also See for ENTERPRISE LINUX 3 - USING CPP:
Table of Contents

Advertisement

Most often when you use the C preprocessor you will not have to invoke it explicitly: the C compiler
will do so automatically. However, the preprocessor is sometimes useful on its own. All the options
listed here are also acceptable to the C compiler and have the same meaning, except that the C compiler
has different rules for specifying the output file.
Note: Whether you use the preprocessor by way of
program's purpose is to translate your command into invocations of the programs that do the actual
work. Their command line interfaces are similar but not identical to the documented interface, and
may change without notice.
The C preprocessor expects two file names as arguments,
reads
together with any other files it specifies with
infile
the combined input files is written in
Either
or
infile
outfile
means to write to standard output. Also, if either file is omitted, it means the same as if
outfile
had been specified for that file.
Unless otherwise noted, or the option ends in
argument appear either immediately after the option, or with a space between option and argument:
and
-Ifoo
-I foo
Many options have multi-letter names; therefore multiple single-letter options may not be grouped:
is very different from
-dM
-D
name
Predefine
name
-D
=
name
definition
Predefine
name
tents of
definition
you may need to use the shell's quoting syntax to protect characters such as spaces that have a
meaning in the shell syntax.
If you wish to define a function-like macro on the command line, write its argument list with
surrounding parentheses before the equals sign (if any). Parentheses are meaningful to most
shells, so you will need to quote the option. With
works.
and
options are processed in the order they are given on the command line. All
-D
-U
and
-include
file
-U
name
Cancel any previous definition of
-undef
Do not predefine any system-specific macros. The common predefined macros remain defined.
outfile
may be
, which as
-
have the same effect.
.
-d -M
as a macro, with definition
as a macro, with definition
, but if you are invoking the preprocessor from a shell or shell-like program
options are processed after all
file
name
or
, the compiler driver is run first. This
gcc
cpp
infile
#include
.
means to read from standard input and as
infile
, all options which take an argument may have that
=
.
1
. There are no restrictions on the con-
definition
and
sh
csh
-D
, either built in or provided with a
Chapter 12.

Invocation

and
. The preprocessor
outfile
. All the output generated by
,
-D'
(
)=
name
args...
and
options.
-U
option.
-D
-
'
definition
-imacros

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 3

Table of Contents