Use these options to preprocess your source files without compiling them. When using these options, only the preprocessing phase of compilation is activated.
Use this option to preprocess to stdout. For example, to preprocess two source files and write them to stdout, enter the following command:
icpc -E prog1.cpp prog2.cpp
Use this option to preprocess to a .i file omitting#line directives. For example, the following command creates two files named prog1.i and prog2.i, which you can use as input to another compilation:
icpc -P prog1.cpp prog2.cpp
Caution
Existing files with the same name and extension are overwritten when you use this option.
Use this option to preprocess to stdout omitting #line directives.
icpc -EP prog1.cpp prog2.cpp
Use this option to retain comments. In this example:
icpc -C -P prog1.cpp prog2.cpp
the compiler preserves comments in the prog1.i preprocessed file.
The following table summarizes the preprocessing options:
Option | Output Includes #line Directives |
Output |
---|---|---|
-E | Yes | stdout |
-P | No | .i file |
-EP | No | stdout |
-P -EP | No | .i file |