Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Compiler Warning (level 1) C4727
Collapse the table of content
Expand the table of content

Compiler Warning (level 1) C4727

Error Message

"PCH named pch_file with same timestamp found in obj_file_1 and obj_file_2. Using first PCH.

C4727 occurs when compiling multiple compilands with /Yc, and where the compiler was able to mark all .obj files with the same .pch timestamp.

To resolve, compile one source file with /Yc /c (creates pch), and the others compile separately with /Yu /c (uses pch), then link them together.

So, if you did the following and generates C4727:

cl /clr /GL a.cpp b.cpp c.cpp /Ycstdafx.h

You would do the following instead:

cl /clr /GL a.cpp /Ycstdafx.h /c

cl /clr /GL b.cpp c.cpp /Yustdafx.h /link a.obj

For more information, see

Community Additions

ADD
Show:
© 2015 Microsoft