Cannot find stdafx.h
When I try to compile a program that uses stdafx.h I always get an error. I've searched for it on my system, then linked to every folder that contains it, but it didn't fix the problem.
Any suggestions, other than uninstalling visual studio and throwing the computer out the window?
where/how are you telling it to look for the files? you should have the directory in your project properties-> C/C++ -> general -> Additional Include Directories
-me
-me
I have it linked under the directories tab under Tools->Options.
The example file I tried compiling is read only, so I assumed everything would be set there, since it can't be altered without removing the read only status.
The example file I tried compiling is read only, so I assumed everything would be set there, since it can't be altered without removing the read only status.
stdafx.h is a precompiled header. The project you tried to compile isn't setup for using a PCH but yet the files include the PCH file. Try commenting out all #include "stdafx.h" and recompile.
Toolmaker
Toolmaker
I created a new project and just used quotations on stdafx.h. I can't alter the example program because it's read only.
How do I set it up to use PCHs?
How do I set it up to use PCHs?
Quote:Original post by dwmitch
I created a new project and just used quotations on stdafx.h. I can't alter the example program because it's read only.
er... so you can copy it or make it not read-only... right-click the file in explorer -> properties -> uncheck read-only
-me
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement