title: C Defining an enum in one header file and using that enum as a function parameter in another file
body: <p>I have defined an enum in a header file, 
   global.h:</p>
  
  <pre><code>Typedef enum
  {
      ELEMENT1,
      ELEMENT2,
      ELEMENT3
  }e_element;
  </code></pre>
  
  <p>I have a second file using the enum as a function parameter.
  file2.c</p>
  
  <pre><code>#include global.h
  #include file2.h
  Function(e_element x)
  {
  Body…
  }
  </code></pre>
  
  <p>The prototype is in:
  file2.h</p>
  
  <pre><code>Function(e_element x);
  </code></pre>
  
  <p>The compiler doesn’t know <code>e_element</code> in <code>file2.h</code>.  I have tried putting the <code>#include</code> for <code>global.h</code> in both <code>file2.c</code> and <code>file2.h</code>, but it still doesn’t see it. I would put the <code>enum</code> in <code>file2.h</code>, except that it is used by several other files, so if I move it the problem will just show up somewhere else.
  How can I get the <code>file2.h</code> prototype to see <code>e_element</code>?</p>