Skip to content

Commit 839cc41

Browse files
authored
Merge pull request #3537 from MicrosoftDocs/master
4/27/2021 AM Publish
2 parents 2dbdf46 + dd8a2cf commit 839cc41

File tree

3 files changed

+126
-176
lines changed

3 files changed

+126
-176
lines changed
Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,53 @@
11
---
2-
description: "Learn more about: /FC (Full Path of Source Code File in Diagnostics)"
3-
title: "/FC (Full Path of Source Code File in Diagnostics)"
4-
ms.date: "11/04/2016"
5-
f1_keywords: ["VC.Project.VCCLCompilerTool.UseFullPaths", "/FC"]
2+
description: "Learn more about: /FC (Full path of source code file in diagnostics)"
3+
title: "/FC (Full path of source code file in diagnostics)"
4+
ms.date: 04/26/2021
5+
f1_keywords: ["VC.Project.VCCLCompilerTool.UseFullPaths", "/FC", "-FC"]
66
helpviewer_keywords: ["/FC compiler option [C++]", "-FC compiler option [C++]"]
77
ms.assetid: 1f11414e-cb42-421b-be68-9d369aab036b
88
---
9-
# /FC (Full Path of Source Code File in Diagnostics)
9+
# `/FC` (Full path of source code file in diagnostics)
1010

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

1313
## Syntax
1414

15-
> /FC
15+
> **`/FC`**
1616
1717
## Remarks
1818

19-
Consider the following code sample:
19+
Consider the following code sample, where the source file is located in *`C:\test\compiler_option_FC.cpp`*:
2020

2121
```cpp
2222
// compiler_option_FC.cpp
23+
2324
int main( ) {
2425
int i // C2143
2526
}
2627
```
2728
28-
Without **/FC**, the diagnostic text would look similar to this diagnostic text:
29+
Without **`/FC`**, the compiler output looks similar to this diagnostic text:
30+
31+
- compiler_option_FC.cpp(5): error C2143: syntax error: missing ';' before '}'
32+
33+
With **`/FC`**, the compiler output looks similar to this diagnostic text:
34+
35+
::: moniker range="<=msvc-150"
36+
37+
- c:\test\compiler_option_fc.cpp(5): error C2143: syntax error: missing ';' before '}'
2938
30-
- compiler_option_FC.cpp(5) : error C2143: syntax error : missing ';' before '}'
39+
::: moniker-end
40+
::: moniker range="msvc-160"
3141
32-
With **/FC**, the diagnostic text would look similar to this diagnostic text:
42+
- C:\test\compiler_option_FC.cpp(5): error C2143: syntax error: missing ';' before '}'
3343
34-
- c:\test\compiler_option_fc.cpp(5) : error C2143: syntax error : missing ';' before '}'
44+
::: moniker-end
3545
36-
**/FC** is also needed if you want to see the full path of a file name when using the &#95;&#95;FILE&#95;&#95; macro. See [Predefined Macros](../../preprocessor/predefined-macros.md) for more information on &#95;&#95;FILE&#95;&#95;.
46+
**`/FC`** is also needed if you want to see the full path of a file name when using the `__FILE__` macro. For more information about `__FILE__`, see [Predefined macros](../../preprocessor/predefined-macros.md).
3747
38-
The **/FC** option is implied by **/ZI**. For more information about **/ZI**, see [/Z7, /Zi, /ZI (Debug Information Format)](z7-zi-zi-debug-information-format.md).
48+
The **`/FC`** option is implied by **`/ZI`**. For more information about **`/ZI`**, see [`/Z7, /Zi, /ZI` (Debug information format)](z7-zi-zi-debug-information-format.md).
3949
40-
**/FC** outputs full paths in lower case.
50+
In Visual Studio 2017 and earlier versions, **`/FC`** outputs full paths in lower case. Starting in Visual Studio 2019, **`/FC`** uses the same casing as the file system for full paths.
4151
4252
### To set this compiler option in the Visual Studio development environment
4353
@@ -47,11 +57,11 @@ The **/FC** option is implied by **/ZI**. For more information about **/ZI**, se
4757
4858
1. Modify the **Use Full Paths** property.
4959
50-
### To set this linker option programmatically
60+
### To set this compiler option programmatically
5161
5262
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.UseFullPaths%2A>.
5363
5464
## See also
5565
56-
[MSVC Compiler Options](compiler-options.md)<br/>
57-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)
66+
[MSVC compiler options](compiler-options.md)\
67+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)

0 commit comments

Comments
 (0)