How do i turn off precompiled headers




















As it searches for the included file see Search Path in The C Preprocessor the compiler looks for a precompiled header in each directory just before it looks for the include file in that directory. If the precompiled header file cannot be used, it is ignored. For instance, if you have include "all.

Alternatively, you might decide to put the precompiled header file in a directory and use -I to ensure that directory is searched before or instead of the directory containing the original header. Choose OK to save your changes. In the Solution Explorer window, right-click the pch. In older projects, the file may be named stdafx. Choose Exclude from Project to remove it from the build. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.

Privacy policy. Sometimes you can spend hours scratching your head over something that has a very basic solution. In this case, the Active configuration was Debug, but I was changing the Precompiled Header option for the Release configuration. When I changed the option in the Debug configuration, voila!

If the problem is not the configuration, it is very likely that you have enabled pre-compiled headers for a single file in your project. This happens in particular, if you have a stdafx.

See the answer by selbie in this post:. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Why can't I disable the use of precompiled headers in Visual Studio? Ask Question.

Asked 6 years, 11 months ago. As well, downvote can be reverted any time. Thank you for improving the answer. Show 12 more comments. Michael Burr Michael Burr k 49 49 gold badges silver badges bronze badges.

According to msdn. Let me know if it doesn't show up for you. I find it preferable to any of the other project templates for setting up a quick-n-dirty, small, self-contained test project. Add a comment. How do I go about turning the predefined headers off? Right click on the.

Select a bunch of cpp source files in the Solution Explorer and turn off as above. SergeyT SergeyT 65 1 1 silver badge 8 8 bronze badges. Howdy: Well technically Sergey is correct; you have created a project set to use a precompiled header, yet you don't include it. What you really need to do is create an empty project or remove the reliance on pre-compiled headers. The hidden question is "why can't I compile the same program I compiled in class"?

And the answer to that question is "in class, the project didn't use a pre-compiled header". Then you can feel free to delete the pch.



0コメント

  • 1000 / 1000