title: C++ undeclared identifier when trying to create an instance of a struct
body: <p>I have a struct that is declared in a C++ header file with the line:</p>
  
  <pre><code>struct AII_Common_Export message{
      ...
  };
  </code></pre>
  
  <p>I am then trying to create an instance of that struct in a C++ source file, so that I can set/ use some of the attributes stored in the struct:</p>
  
  <pre><code>message data;
  </code></pre>
  
  <p>However, when I compile my code, I get an "undeclared identifier" error on this line... I have included the header file in the source file, so I don't understand why I am getting this error- can someone explain it to me?</p>
  
  <p>I also tried creating the instance of it with:</p>
  
  <pre><code>AII_Common_Export message data;
  </code></pre>
  
  <p>But then got the compile error: "syntax error: missing ';' before identifier 'data'.</p>
  
  <p>Any ideas how I can fix this, so that I can create an instance of the struct?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I have just found the <code>AII_Common_Export</code> definition- it is defined with:</p>
  
  <pre><code>#    define AII_Common_Export ACE_Proper_Import_Flag
  </code></pre>
  
  <p>and the <code>ACE_Proper_Import_Flag</code> is defined with:</p>
  
  <pre><code>#define ACE_Proper_Import_Flag __declspec (dllimport)
  </code></pre>
  
  <p>These two definitions are in separate header files.</p>