title: Defining global constants in C
body: <p>How can I define a global constant in C? 
  I was told to do some thing like this </p>
  
  <p>in header.h</p>
  
  <pre class="lang-c prettyprint-override"><code>const u32 g_my_const;
  </code></pre>
  
  <p>in code.c</p>
  
  <pre class="lang-c prettyprint-override"><code>#include "header.h"
  const u32 g_my_const= 10U;
  </code></pre>
  
  <p>But I get a compilation error:</p>
  
  <blockquote>
    <p>error: uninitialized const 'g_my_const' [-fpermissive]</p>
  </blockquote>
  
  <p>Can some one explain how to do this properly.</p>