/Fo (Object File Name)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at -Fo (Object File Name).

Specifies an object (.obj) file name or directory to be used instead of the default.

/Fopathname  

If you do not use this option, the object file uses the base name of the source file and the .obj extension. You can use any name and extension you want, but the recommended convention is to use .obj.

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 Output Files property page.

  4. Modify the Object File Name property. In the development environment, the object file must have an extension of .obj.

To set this compiler option programmatically

The following command line creates an object file named THIS.obj in an existing directory, \OBJECT, on drive B.

CL /FoB:\OBJECT\ THIS.C  

Output-File (/F) Options
Compiler Options
Setting Compiler Options
Specifying the Pathname

Show: