Precompiled Header (pch) use is a two-step process.
In step one, you compile a stub file (In VS200x it's usually called stdafx.cpp
. Newer versions use pch.cpp
.). This stub file indirectly includes only the headers you want precompiled. Typically, one small header (usually stdafx.h
or pch.hpp
) lists standard headers such as <iostream>
and <string>
, and this is then included in the stub file. Compiling this creates the .pch file.
In step 2, your actual source code includes the same small header from step 1 as the first header. The compiler, when it encounters this special header, reads the corresponding .pch file instead. That means it doesn't have to (re)compile those standard headers every time.
In your case, it seems step 1 fails. Is the stub file still present? In your case, that would probably be xxxxx.cpp
. It must be a file that's compiled with /Yc:xxxxx.pch
, since that's the compiler flag to indicate it's step 1 of the PCH process. If xxxxx.cpp
is present, and is such a stub file, then it's probably missing its /Yc:
compiler option.