Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.96 KB

fc-full-path-of-source-code-file-in-diagnostics.md

File metadata and controls

56 lines (35 loc) · 1.96 KB
title ms.date f1_keywords helpviewer_keywords ms.assetid
/FC (Full Path of Source Code File in Diagnostics)
11/04/2016
VC.Project.VCCLCompilerTool.UseFullPaths
/FC
/FC compiler option [C++]
-FC compiler option [C++]
1f11414e-cb42-421b-be68-9d369aab036b

/FC (Full Path of Source Code File in Diagnostics)

Causes the compiler to display the full path of source code files passed to the compiler in diagnostics.

Syntax

/FC

Remarks

Consider the following code sample:

// compiler_option_FC.cpp
int main( ) {
   int i   // C2143
}

Without /FC, the diagnostic text would look similar to this diagnostic text:

  • compiler_option_FC.cpp(5) : error C2143: syntax error : missing ';' before '}'

With /FC, the diagnostic text would look similar to this diagnostic text:

  • c:\test\compiler_option_fc.cpp(5) : error C2143: syntax error : missing ';' before '}'

/FC is also needed if you want to see the full path of a file name when using the __FILE__ macro. See Predefined Macros for more information on __FILE__.

The /FC option is implied by /ZI. For more information about /ZI, see /Z7, /Zi, /ZI (Debug Information Format).

/FC outputs full paths in lower case.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > C/C++ > Advanced property page.

  3. Modify the Use Full Paths property.

To set this linker option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.UseFullPaths%2A.

See also

MSVC Compiler Options
MSVC Compiler Command-Line Syntax