Re: Interesting #define #ifdef behavior

Tech-Archive recommends: Fix windows errors by optimizing your registry



David wrote:
I found a module that simply refuses to process certain
#defines
and even #pragma message statements early in the source file. I'd like to
know
what problem I've run into and what the proper resolution needs to be.

When using the precompiled header feature everything before the

#include "stdafx.h"

is ignored. That line tells the compiler to restore the state it saved when precompiling. It must be the first (noncomment) line in the file.

--
Scott McPhillips [VC++ MVP]

.



Relevant Pages

  • Re: VC2005 Pro: IDE (Compiler ?) cant find Stdafx.h
    ... > David F wrote: ... > you told the compiler to include a file that does not exist. ... I also recalled that the "NOT using precompiled header files" was not by ... > emphasize SOURCE file - What else would a compiler be looking for? ...
    (microsoft.public.vc.language)
  • Re: poll interval - RFC compliance question
    ... Ie, that notice is infomational, not a legal requirement. ... and unless they all transfered copyright to David ... each source file has its own copyright notice in ... collective work of all the contributors. ...
    (comp.protocols.time.ntp)
  • Re: source code verification
    ... David Ching escribió: ... In my company, we use a SCC string for every source file used, like: ... This way, every time you check in the source file, VSS expands "$Header:$" to something ... string is included in the final executable, so later you can check what source files were used to build an exe, dll or ocx. ...
    (microsoft.public.vc.mfc)