Name
cpp
Synopsis
cpp [options] [ ifile [ ofile ] ]
Description
GNU C language preprocessor. cpp is invoked as the first pass of any C compilation by the gcc command. The output of cpp is a form acceptable as input to the next pass of the C compiler, and cpp normally invokes gcc after it finishes processing. ifile and ofile are, respectively, the input and output for the preprocessor; they default to standard input and standard output.
Options
- -$
Do not allow $ in identifiers.
- -dM
Suppress normal output. Print series of #defines that create the macros used in the source file.
- -dD
Similar to -dM but exclude predefined macros and include results of preprocessing.
- -idirafter dir
Search dir for header files when a header file is not found in any of the included directories.
- -imacros file
Process macros in file before processing main files.
- -include file
Process file before main file.
- -iprefix prefix
When adding directories with -iwithprefix, prepend prefix to the directory’s name.
- -iwithprefix dir
Append dir to the list of directories to be searched when a header file cannot be found in the main include path. If -iprefix has been set, prepend that prefix to the directory’s name.
- -lang-c, -lang-c++, -lang-objc, -lang-objc++
Expect the source to be in C, C++, Objective C, or Objective C++, respectively.
- -lint
Display all lint commands in comments as #pragma lint command.
- -nostdinc
Search only specified, not standard, directories for header files.
- -nostdinc++
Suppress searching of directories ...
Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.