Export (0) Print
Expand All
Expand Minimize

/EP (Preprocess to stdout Without #line Directives)

/EP

This option preprocesses C and C++ source files and copies the preprocessed files to the standard output device. In the process, all preprocessor directives are carried out, macro expansions are performed, and comments are removed. To preserve comments in the preprocessed output, use the /C option along with /EP.

The /EP option suppresses compilation. You must resubmit the preprocessed file for compilation. /EP also suppresses the output files from the /FA, /Fa, and /Fm options.

Errors generated during later stages of processing refer to the line numbers of the preprocessed file rather than the original source file. If you want line numbers to refer to the original source file, use /E instead. The /E option adds #line directives to the output for this purpose.

To send the preprocessed output, with #line directives, to a file, use the /P option instead.

To send the preprocessed output to stdout, with #line directives, use /P and /EP together.

You cannot use precompiled headers with the /EP option.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
  2. Click the C/C++ folder.
  3. Click the Preprocessor property page.
  4. Modify the Generate Preprocessed File property.

To set this compiler option programmatically

See GeneratePreprocessedFile Property.

Example

The following command line preprocesses file ADD.C, preserves comments, and displays the result on the standard output device:

CL /EP /C ADD.C

See Also

Compiler Options | Setting Compiler Options

Show:
© 2014 Microsoft