title: struct error in defining struct in one header file, and using it in another
body: <p>I have 4 Files = pic.h, main.c, framehandle.c and framehandle.h</p>
  
  <p>Both pic.h and framehandle.h are included within my main: </p>
  
  <pre><code>#include "pic.h"
  #include "framehandling.h"
  </code></pre>
  
  <p>pic.h has the following struct definition.</p>
  
  <pre><code>struct f
  {
      unsigned sleep : 1;
      unsigned push  : 1;
      unsigned rx    : 1;
      unsigned tx    : 1;
      unsigned validPacket : 1;
  };
  </code></pre>
  
  <p>I declare this struct in my main.c file using </p>
  
  <pre><code>struct f flag; 
  </code></pre>
  
  <p>when I try to use this inside framehandle.c I get an undeclared error which I understand. </p>
  
  <p>To solve this I add the following inside framehandle.h: </p>
  
  <pre><code>extern struct f flag;
  </code></pre>
  
  <p>However the compiler is still complaining that flags are not declared inside framehandle.c</p>
  
  <p>What am i doing wrong? 
  wouldn't extern struct f flag; supposed to tell the compiler to look else where for the decleration? 
  wouldnt't placing this inside the subjects header be the correct place?</p>
  
  <p>--Edit--</p>
  
  <p>I am adding the sequence of my include files and my variable declerations</p>
  
  <pre><code>#include "pic.h"
  #include "framehandling.h"
  
  struct f flag;
  
  void main(void)
  { }
  </code></pre>