title: struct in header compilation error
body: <p>I'm trying to write a framework library which wraps MPI.</p>
  
  <p>I have a header file for the framework call <code>afw.h</code> and an implementation file for the framework called <code>afw.c</code>.</p>
  
  <p>I would like to be able to write application code which uses the framework by doing <code>#include "afw.h"</code> in the application code.</p>
  
  <p>An excerpt from <code>afw.h</code>:</p>
  
  <pre><code>#ifndef AFW_H
  #define AFW_H
  
  #include &lt;mpi.h&gt;
  
  struct ReqStruct
  {
      MPI_Request req;
  };
  
  ReqStruct RecvAsynch(float *recvbuf, FILE *fp);
  int RecvTest(ReqStruct areq);
  </code></pre>
  
  <p>I provide an implementation for <code>RecvAsynch</code> in <code>afw.c</code> which <code>#includes afw.h</code></p>
  
  <p>When I compile using <code>mpicc</code> (an MPI compiler wrapper in this case using pgc underneath):</p>
  
  <pre><code>mpicc -c afw.c -o afw.o
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>PGC-S-0040-Illegal use of symbol, ReqStruct (./afw.h: 69)
  PGC-W-0156-Type not specified, 'int' assumed (./afw.h: 69)
  PGC-S-0040-Illegal use of symbol, ReqStruct (./afw.h: 71)
  PGC-W-0156-Type not specified, 'int' assumed (./afw.h: 71)
  </code></pre>
  
  <p>and similar errors wherever <code>ReqStruct</code> is used in <code>afw.c</code></p>
  
  <p>Any ideas what I am doing wrong?</p>