title: Obj-C error: "expected unqualified-id before class pointer"
body: <p>I am currently working on a iOS development project. For convenience I split the features in several small programs in early stage. The project consists of Obj-C, Obj-C++ and C++ programs. Right now I am putting all them together into the final product and encountered some strange behaviors in terms of (I guess) compatibility between Obj-C and C++.</p>
  
  <p>I am trying to initialize an object in an obj-C++ program, which comes from an obj-C class. But I keep getting error when compiling the obj-C class header file:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  @class AVAssetExportSession;
  
  @interface LibraryImport : NSObject {
  AVAssetExportSession * export;   //Error line
  NSError* movieFileErr;
  }
  //class methods
  </code></pre>
  
  <p>The transcript goes like this: </p>
  
  <p>LibraryImport.h:24: error: expected unqualified-id before 'export'</p>
  
  <p>LibraryImport.h:24: error: instance variable 'unnamed' has unknown size</p>
  
  <p>LibraryImport.h:24: error: expected `;' before 'export'</p>
  
  <p>The call goes like this in the obj-C++ file: (No error detected here, just feel something might related)</p>
  
  <pre><code>LibraryImport* import = [[LibraryImport alloc] init];
  </code></pre>
  
  <p>The weirdest part is that when it was originally called by a pure Obj-C program, it works really fine. But the project nature needs to change the caller to obj-C++. And also, when I tried to change the obj-C file to obj-C++, I got even more errors than before, including the existing one.</p>
  
  <p>Here are the questions that keep me banging my head against the wall for the past whole week:</p>
  
  <ol>
  <li><p>In this case, how I can successfully initialize this object? </p></li>
  <li><p>Is this problem related to compatibility between obj-C and C++? If so, is there a general solution or some clear explanation on the compatibility?</p></li>
  </ol>
  
  <p>Let me know if more information is needed (It's my first time encountering this problem and I don't even know where to start...). Any insight will be appreciated. Thank you very much :-)</p>
  
  <p>Cheers,</p>
  
  <p>Manca</p>