/Fi (Preprocess output file name)
Specifies the name of the output file to which the
/P (Preprocess to a File) compiler option writes preprocessed output.
The relative or absolute path and filename of the output file produced by the
/P compiler option. Or, the directory path for the
.i output files when more than one input file is specified. Don't put a space between the
/Fi option and
/Fi compiler option in combination with the
/P compiler option. If
/P isn't specified,
/Fi causes command line warning D9007.
If you specify only a directory path (a path that ends in a backslash
\) for the
pathname parameter, the base name of the source file is used as the base name of the preprocessed output file. The
pathname parameter doesn't require a particular file name extension. However, an extension of ".i" is used if you don't specify a file name extension.
The following command line preprocesses
PROGRAM.cpp, preserves comments, adds
#line directives, and writes the result to the
CL /P /FiMYPROCESS.I PROGRAM.CPP
This command line preprocesses
helper.i in a subdirectory named
CL /P /Fi".\\preprocessed\\" main.cpp helper.cpp
To set this compiler option in the Visual Studio development environment
Open the source file or the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > C/C++ > Preprocessor property page.
Set the Preprocess to a File property to Yes.
Select the Configuration Properties > C/C++ > Command Line property page.
/Ficompiler option and
pathnamein the Additional Options box. Only specify a directory path, not a filename, when setting this property for a project.
To set this compiler option programmatically
- See AdditionalOptions.