Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: "David F" <David-White@xxxxxxxxxxxxx>
- Date: Tue, 27 Dec 2005 08:03:00 GMT
See below inline -
David
"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:Os9U3BqCGHA.3784@xxxxxxxxxxxxxxxxxxxxxxx
> David F wrote:
> > I understand well what you say and what Scott wrote but how
> > does it correlate with the facts I wrote about and repeat here:
> > 1. I did not setup up anything regarding the create \ use of precompiled
> > header files.
> > 2. I did find that by default, this option in the Project->Property
Settings
> > is set to "NOT use
> > precompile header files". Isn't here that it tells compiler\linker to
> > create\use the precompiled
> > 3.The complain is that it does not find the stdafx.h SOURCE file
> > 4. I do need the atdafx.h file
>
> Your first post said you have #include "stdafx.h" in your code but you
> do not have a stdafx.h file in your project directory. In other words
> you told the compiler to include a file that does not exist. If all
> this is true then that's why it issues the "does not find" error
> message. I hope that makes sense? Also, I don't understand why you
The answer is apparently not. I forgot that, as mark wrote, that
stdafx.h/.cpp are produced by the compiler if I have the #include "stdafx.h"
statement in my source files. So the problem then shifts to not why does
not the compiler find stdafx.h (that is now clear) but rather why does not
it
producing them (or is it possible it producing them in some weird place?!).
I also recalled that the "NOT using precompiled header files" was not by
default but as Mark wrote, by me checking off a respective box during
the new project setup dialogs. But the bottom line is that I am not using
precompiled header files.
I also recalled that in the beta version, I had to include the statement
#undef UNICODE
before the #include "stdafx.h" (thanks to a tip someone gave me here)
but it did not help now even though I added it.
> emphasize SOURCE file - What else would a compiler be looking for? You
> seem to be making some assumptions here that are incorrect, and its hard
> to guess how you are thinking it should work.
I think you are right about this comment - so forget about my emphasis.
>
> The easy solution: Start a new project. Make sure it is the kind of
> project you want for your program. This will give you the proper
> default build settings, and a proper stdafx.h file. Then copy and paste
> your code into the new project.
I have tried that twice (with two different source files that worked
under the VS2005 Beta version) and it did not help.
I noticed by searching the microsoft website that there is a ton of
complains on that very problem but could not find a respond there
that address the root cause of the problem.
Have you actually tried to produce an elementary Win32 Console
Application that has the #include "stdafx.h" statement and
found it to be working with no problem under the VS 2005 Pro
released version?
David
>
> --
> Scott McPhillips [VC++ MVP]
>
.
- Follow-Ups:
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: John Carson
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- References:
- VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: Mark Randall
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: Mark Randall
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: David F
- Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- From: Scott McPhillips [MVP]
- VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- Prev by Date: Is thread take same memory space
- Next by Date: Re: Is thread take same memory space
- Previous by thread: Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- Next by thread: Re: VC2005 Pro: IDE (Compiler ?) can't find Stdafx.h
- Index(es):
Relevant Pages
|