Skip to content

Commit f04501a

Browse files
author
Colin Robertson
committed
Address issue in c2855 for 2779
1 parent 6ab7909 commit f04501a

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
---
22
description: "Learn more about: Compiler Error C2855"
33
title: "Compiler Error C2855"
4-
ms.date: "11/04/2016"
4+
ms.date: 02/16/2021
55
f1_keywords: ["C2855"]
66
helpviewer_keywords: ["C2855"]
7-
ms.assetid: bfcd2619-f1e4-4016-95ee-5bdabe26fbad
87
---
98
# Compiler Error C2855
109

11-
command-line option 'option' inconsistent with precompiled header
10+
> command-line option '*option*' inconsistent with precompiled header
1211
13-
The given command-line option differs from the option used to create the precompiled header. Regenerate the precompiled header with the given command-line option.
12+
This error occurs when a command-line option differs from the options used to create the precompiled header.
13+
14+
## Remarks
15+
16+
Error C2855 can occur when you make an incremental build after changing a compiler option. It can also happen if you set specific compiler options for individual source files.
17+
18+
To resolve this error, regenerate the precompiled header by using the specified command-line option. To regenerate the precompiled header, build the associated source file. For example, projects created by a Visual Studio template usually create a source file named *`pch.cpp`* to generate the precompiled header. (In older versions of Visual Studio, this file is named *`stdafx.cpp`*.) In other projects, the source file to rebuild is the one built by using the [`/Yc` (Create precompiled header file)](../../build/reference/yc-create-precompiled-header-file.md) compiler option. We recommend you rebuild your entire project after making a change to the precompiled header.
19+
20+
## See also
21+
22+
[`/Y` (Precompiled headers)](../../build/reference/y-precompiled-headers.md)\
23+
[Precompiled header files](../../build/creating-precompiled-header-files.md)

0 commit comments

Comments
 (0)