Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 1.26 KB

compiler-warning-level-1-c4627.md

File metadata and controls

32 lines (25 loc) · 1.26 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 1) C4627
Compiler Warning (level 1) C4627
09/09/2018
C4627
C4627
8840f3e6-b496-423a-8635-eb55d5f854a2

Compiler Warning (level 1) C4627

'header_file': skipped when looking for precompiled header use

If the current source file has the /Yu (Use precompiled header file) 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:

// 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";
}

See also

Creating Precompiled Header Files