title: Precompiled Headers IntelliSense Error
body: <p>I have Precompiled Headers enabled in a static library project I am working on. Looking around other StackOverflow questions, it seems like the key place to #include "stdafx.h" is in the .cpp file, not the .h file.</p>
  
  <p>However, when I do this in Visual Studio, I get an IntelliSense error: </p>
  
  <blockquote>
    <p>1 IntelliSense: PCH warning: header stop cannot be in a macro or #if block.  An IntelliSense PCH file was not generated. ....\Common\Core\Geometry\Ellipsoid.h    9</p>
  </blockquote>
  
  <p>The static library project <strong>does</strong> compile successfully, even with this IntelliSense error.</p>
  
  <p>The .h file consists of this class declaration:</p>
  
  <pre><code>#ifndef GEOMETRY_ELLIPSOID_H
  #define GEOMETRY_ELLIPSOID_H
  
  class Ellipsoid { // 'class' is underlined with a red line (error)
      // ...
  };
  
  #endif // !GEOMETRY_ELLIPSOID_H
  </code></pre>
  
  <p>The .cpp defines the class declared in the header:</p>
  
  <pre><code>#include "Common\Core\stdafx.h"
  #include "Ellipsoid.h"
  
  // ...
  </code></pre>
  
  <p>By including stdafx.h in the header, the intelliSense error disappears. Is this the correct way to use precompiled headers? What implications are there in including stdafx.h in the header?</p>