PCH Warning: header stop cannot be in a macro or #if block - Visual C++ 2010 Express SP1

I had the same issue and was looking for a solution. Following worked for me:

Add #pragma once at the start of the file (even before the #ifndef APP_STATE_H header guard)


You probably used a project template to get started and threw away the pre-generated source code files. Those project templates like to turn on precompiled headers because it is such a time-saver. Right-click your project in the Solution Explorer window, Properties, C/C++, Precompiled Headers. Change the "Precompiled Header" setting to "Not Using".