title: Class type scope
body: <p>I have an Objective-C++ project in Xcode which compiles fine when on the normal build scheme, but when I compile for Archive, Analyze or Profile I get the compile error:</p>
  
  <p>Must use 'class' tag to refer to type 'Line' in this scope</p>
  
  <p>This is a very much simplified version of my code:</p>
  
  <pre><code>class Document;
  
  class Line
  {
  public:
      Line();
  
  private:
      friend class Document;
  };
  
  class Document
  {
  public:
      Document();
  
  private:
      friend class Line;
  };
  </code></pre>
  
  <p>The errors occur anywhere I try to use the type Line. Eg.</p>
  
  <pre><code>Line *l = new Line();
  </code></pre>
  
  <p>Do you know how to fix this error message and why it only appears when compiling in one of the schemes listed above?</p>