title: "Does not name a type" error, but class pointer already has forward declaration?
body: <p>I am getting this compiler error</p>
  
  <pre><code>error: 'RawLog' does not name a type
  </code></pre>
  
  <p>Here is the relevant code:</p>
  
  <pre><code>//DataAudit.h
  #ifndef DATAAUDIT_H
  #define DATAAUDIT_H
  
  class RawLog;
  
  class DataAudit
  {
  ...
  private:
      RawLog* _createNewRawLog(); // This is the line indicated with the error
  };
  
  #endif // DATAAUDIT_H
  </code></pre>
  
  <p>Usually a forward declaration resolves this kind of error. <a href="https://stackoverflow.com/a/12588252/446554">This</a> answer indicates that a circular header inclusion may cause this. But doesn't the use of the <code>#ifndef</code> and <code>#define</code> statements prevent circular header inclusion?</p>
  
  <p>Is there another reason I might see this error?</p>
  
  <p>What are some avenues of approach I could use to further deduce the nature of this error?</p>
  
  <p><strong>Update:</strong> This is rather odd. I have a <code>Globals.h</code> file, and if I define a new <code>enum</code> in <code>Globals.h</code>, the error appears. Then if I comment out the <code>enum</code>, the error goes away. This leads me to think that the circular dependency has existed for a while, and adding the <code>enum</code> somehow re-orders the compilation units, thus exposing the dependency that wasn't there before?</p>