Delen via


/EP (Preprocess to stdout Without #line Directives)

Preprocesses C and C++ source files and copies the preprocessed files to the standard output device.

/EP

Remarks

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 (Preserve Comments During Preprocessing) option 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. For more information, see /FA, /Fa (Listing File) and /Fm (Name Mapfile).

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 (Preprocess to stdout) 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 (Preprocess to a File) 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 How to: Open Project Property Pages.

  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

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

Reference

Compiler Options

Setting Compiler Options