title: global variable compiler error
body: <p>i have defined some extern variables at a header file named variables.h like so :</p>
  
  <pre><code>#ifndef VARIABLES_H
  #define VARIABLES_H
  
  
  extern int var1;
  extern int var2;
  
  #endif
  </code></pre>
  
  <p>Then i add it to my source files.</p>
  
  <p>The compiler warns me the following:</p>
  
  <pre><code>error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘var1’
  </code></pre>
  
  <p>That goes on for every variable and ends at the final variable.</p>
  
  <p>What is the problem?</p>
  
  <p>The error appears at variables.h for every variable.</p>
  
  <p>file.h :</p>
  
  <pre><code>#ifndef FILE_H
  #define FILE_H
  
  void do_sth(void);  
  
  void do_sth_else(void);
  
  #endif
  </code></pre>
  
  <p>file.c :</p>
  
  <pre><code>#include "variables.h"
  
  /* Quit */
  void do_sth(void) { 
  /* do sth */
  }
  
  void do_sth_else(void) { 
  /* do sth else */
  }
  </code></pre>
  
  <p>thats all.
  The error is:</p>
  
  <pre><code>error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘var1’
  
  error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘var2’
  </code></pre>