IntelliSense: PCH warning: Can not find a suitable header stop location. A PCH file wasn't generated. - by tom_mai78101

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 650359 Comments
Status Closed Workarounds
Type Bug Repros 3
Opened 3/9/2011 5:23:09 AM
Access Restriction Public


Here's the thread that was posted a week ago, by me.

This error occurred after I had installed Visual Studio 2010 SP1 Beta. In the thread, I have provided a picture. I don't know how to provide a picture over here in Microsoft Connect.

It's possible that if there are no headers, this error may occur.
Sign in to post a comment.
Posted by zhangxaochen on 6/9/2014 at 7:03 AM
@Ulzii Luvsanbat, "to just disable PCH usage for that one cpp file you've added" -- this does not work for me. I had to add "#whatever" on my machine...
Posted by thaimin on 5/10/2011 at 12:49 PM
This is still a problem. Disabling PCH for a single file and the whole solution does NOT fix the issue. Compiling works fine. Also, I cannot use the solution provided in the above link since, due to program restraints, I cannot include any headers.
Posted by Microsoft on 3/21/2011 at 6:13 PM
Hello Tom,

Thank you for your feedback. And yes, there is a good explanation for this. As you know, by default all VC++ projects are PCH-enabled at the project level, and therefore when you add a new .cpp file to the project it will inherit the PCH settings as well. Now, when you do a build after you've just added a new .cpp file without including any header, compiler will actually give you an error saying the same message as the IntelliSense warning you're seeing. Essentially, you're telling the compiler to use /Yu a pch that was created before, in a compilation unit that doesn't use the anything from the pch.
What you can do is, to just disable PCH usage for that one cpp file you've added, which will clear both IntelliSense and compiler warning/error.

Ulzii Luvsanbat
Windows C++ Team
Posted by tom_mai78101 on 3/10/2011 at 6:31 AM
Oh goody! Loved to hear some detailed explanations about this troubled IntelliSense problem. :)
Posted by Microsoft on 3/9/2011 at 6:29 PM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 3/9/2011 at 6:13 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(