Why am I getting linking errors even with header guards?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/14425262/why-does-this-not-prevent-multiple-function-declarations">Why does this not prevent multiple function declarations?</a>  </p>
</blockquote>



<p>Global.h</p>

<pre><code>#ifndef Global_h
#define Global_h

#include &lt;iostream&gt;

unsigned char exitStatus;

#endif
</code></pre>

<p>OutputHandler.h</p>

<pre><code>#ifndef OutputHandler_h
#define OutputHandler_h

#include "Global.h"

class OutputHandler {
private:
    static bool instanceExists;
// more code  

#endif
</code></pre>

<p>Root.h</p>

<pre><code>#ifndef Root_h
#define Root_h

// declarations

OutputHandler *output;

#endif
</code></pre>

<p>Root.cpp</p>

<pre><code>#include "Root.h"
// gets instance of OutputHandler
// more code
</code></pre>

<p>I am getting errors regarding <strong>exitStatus</strong>, <strong>static bool instanceExists</strong>, and <strong>static class output</strong> being already defined by <strong>Root.obj</strong> in <strong>OutputHandler.obj</strong>. I assume the issue is with including the header file <strong>OutputHandler.h</strong> in both <strong>Root.h</strong> and <strong>OutputHandler.cpp</strong>. Anyone know how to fix this or how to better organize header files?</p>
