Linux in a Nutshell, Third Edition
by Ellen Siever, Stephen Spainhour, Jessica P. Hekman, Stephen Figgins
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access