We have several projects where we #include "resource.h" in stdafx.h (I know,
bad practice, but let's ignore that for now). For some reason when we make
a change to resource.h and build the project, the compiler doesn't realise
it needs to rebuild stdafx.cpp. It thinks everything is up to date. But
when it compiles the .cpp file that uses the new ID we just defined, say, it
gives an error that the ID is not defined, because it hasn't compiled the
new resource.h. So any time we change resource.h, we have to Rebuild All
instead of just Build.

Any idea why that would be? Other .h files included in stdafx.h work just
fine--when they change the compiler knows to rebuild stdafx.cpp etc.


Nate Hekman
Calgary, Alberta, Canada

Re: dependency issue, build instead of rebuild by anonymous

anonymous
Tue Dec 16 09:15:17 CST 2003

Maybe you should remove the line
//{{NO_DEPENDENCIES}}
from resource.h
>-----Original Message-----
>We have several projects where we #include "resource.h"
in stdafx.h (I know,
>bad practice, but let's ignore that for now). For some
reason when we make
>a change to resource.h and build the project, the
compiler doesn't realise
>it needs to rebuild stdafx.cpp. It thinks everything is
up to date. But
>when it compiles the .cpp file that uses the new ID we
just defined, say, it
>gives an error that the ID is not defined, because it
hasn't compiled the
>new resource.h. So any time we change resource.h, we
have to Rebuild All
>instead of just Build.
>
>Any idea why that would be? Other .h files included in
stdafx.h work just
>fine--when they change the compiler knows to rebuild
stdafx.cpp etc.
>
>
>Nate Hekman
>Calgary, Alberta, Canada
>
>
>
>.
>

Re: dependency issue, build instead of rebuild by Nathaniel

Nathaniel
Wed Dec 17 09:37:06 CST 2003

I just read up on the {{NO_DEPENDENCIES}} line. What a crazy thing! Why in
the world would I want that?! Unfortunately I can remove the line but the
resource editor always puts it back. It seems the only way around my
problem is to not use the resource editor. What a bummer. There should be
an option in the resource editor to not include that line, or an option in
the compiler to ignore it.

Nate


<anonymous@discussions.microsoft.com> wrote in message
news:0b3301c3c3e7$696f0110$a401280a@phx.gbl...
> Maybe you should remove the line
> //{{NO_DEPENDENCIES}}
> from resource.h
> >-----Original Message-----
> >We have several projects where we #include "resource.h"
> in stdafx.h (I know,
> >bad practice, but let's ignore that for now). For some
> reason when we make
> >a change to resource.h and build the project, the
> compiler doesn't realise
> >it needs to rebuild stdafx.cpp. It thinks everything is
> up to date. But
> >when it compiles the .cpp file that uses the new ID we
> just defined, say, it
> >gives an error that the ID is not defined, because it
> hasn't compiled the
> >new resource.h. So any time we change resource.h, we
> have to Rebuild All
> >instead of just Build.
> >
> >Any idea why that would be? Other .h files included in
> stdafx.h work just
> >fine--when they change the compiler knows to rebuild
> stdafx.cpp etc.
> >
> >
> >Nate Hekman
> >Calgary, Alberta, Canada
> >
> >
> >
> >.
> >