After chosing the option "use precompiled header trougth file" and including
a standard header file stdafx.h in each header file, the compiler still
complains that cannot find the pre-compiled header.

Does anyone know how to solve the problem?

Thanks!

Re: use precompiled header by Simon

Simon
Thu Jul 15 04:03:02 CDT 2004

One file has to be set to "create precompiled header through file". Usually
it's stdafx.cpp, that just #includes stdafx.h.

"pat" <pat@pattern.com> wrote in message
news:uA3t3wjaEHA.3352@TK2MSFTNGP12.phx.gbl...
> After chosing the option "use precompiled header trougth file" and
including
> a standard header file stdafx.h in each header file, the compiler still
> complains that cannot find the pre-compiled header.
>
> Does anyone know how to solve the problem?
>
> Thanks!
>
>
>
>



Re: use precompiled header by Ajay

Ajay
Thu Jul 15 22:09:13 CDT 2004

Are you building the corresponding stdafx.cpp which includes this header?

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"pat" <pat@pattern.com> wrote in message
news:uA3t3wjaEHA.3352@TK2MSFTNGP12.phx.gbl...
> After chosing the option "use precompiled header trougth file" and
including
> a standard header file stdafx.h in each header file, the compiler still
> complains that cannot find the pre-compiled header.
>
> Does anyone know how to solve the problem?
>
> Thanks!
>
>
>
>



Re: use precompiled header by Tim

Tim
Sun Jul 18 00:28:53 CDT 2004

"pat" <pat@pattern.com> wrote:
>
>After chosing the option "use precompiled header trougth file" and including
>a standard header file stdafx.h in each header file,...

That's not the way you do it. The idea is that you put your common (and
unlikely to change) list of #includes into stdafx.h, and then you include
stdafx.h FIRST in all of your .cpp files. You do not put stdafx.h in your
include files.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc