Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
/FC (Full Path of Source Code File in Diagnostics)
Collapse the table of content
Expand the table of content

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

Updated: October 2009

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

/FC

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).

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. Expand the Configuration Properties node.

  3. Expand the C/C++ node.

  4. Select the Advanced property page.

  5. Modify the Use Full Paths property.

To set this linker option programmatically

Date

History

Reason

October 2009

Clarified the usage for this switch.

Information enhancement.

Community Additions

ADD
Show:
© 2015 Microsoft