Cannot find stdafx.h

Started by
4 comments, last by Palidine 19 years, 8 months ago
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?
300In the land of the proud and freeyou can sell your soul and your dignityfor fifteen minutes on tvhere in Babylon.
Advertisement
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
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.
300In the land of the proud and freeyou can sell your soul and your dignityfor fifteen minutes on tvhere in Babylon.
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

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?
300In the land of the proud and freeyou can sell your soul and your dignityfor fifteen minutes on tvhere in Babylon.
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