Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.37 KB

compiler-error-c2855.md

File metadata and controls

23 lines (16 loc) · 1.37 KB
description Learn more about: Compiler Error C2855
title Compiler Error C2855
ms.date 02/16/2021
f1_keywords
C2855
helpviewer_keywords
C2855

Compiler Error C2855

command-line option 'option' inconsistent with precompiled header

This error occurs when a command-line option differs from the options used to create the precompiled header.

Remarks

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.

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) compiler option. We recommend you rebuild your entire project after making a change to the precompiled header.

See also

/Y (Precompiled headers)
Precompiled header files