Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Compiler Warning (level 1) C4627 | Microsoft Docs"
ms.custom: ""
ms.date: "11/04/2016"
ms.date: "09/09/2018"
ms.technology: ["cpp-diagnostics"]
ms.topic: "error-reference"
f1_keywords: ["C4627"]
Expand All @@ -13,9 +13,26 @@ ms.author: "corob"
ms.workload: ["cplusplus"]
---
# Compiler Warning (level 1) C4627
'\<identifier>': skipped when looking for precompiled header use

> '*header_file*': skipped when looking for precompiled header use

If the current source file has the [/Yu \(Use precompiled header file)](../../build/reference/yu-use-precompiled-header-file.md) option set, then the compiler ignores everything in the file before the precompiled header is included. Warning **C4627** is generated in Visual Studio 2015 and earlier versions if *header_file* is included before the precompiled header file, and if the precompiled header does not also include *header_file*.

## Example

This sample demonstrates how the error can occur, and shows how to fix it:

```cpp
// c4627.cpp
#include <iostream> // C4627 - iostream not included by pch.h
#include "pch.h" // precompiled header file that does not include iostream
// #include <iostream> // To fix, move the iostream header include here from above
int main()
{
std::cout << "std::cout is defined!\n";
}
```

While searching for the location where a precompiled header is used, the compiler encountered an `#include` directive for the *\<identifier>* include file. The compiler ignores the `#include` directive, but issues warning **C4627** if the precompiled header does not already contain the *\<identifier>* include file.

## See Also
[Creating Precompiled Header Files](../../build/reference/creating-precompiled-header-files.md)
## See Also

[Creating Precompiled Header Files](../../build/reference/creating-precompiled-header-files.md)