title: Global Pointer "already defined in" error
body: <p>I'm writing a little DirectX model viewer.</p>
  
  <p>I just finished writing my scene manger.</p>
  
  <p>I will only ever have 1 scene manger object so my idea was to create a global pointer of type "scnManger" and then set it when i create my scene manger object.</p>
  
  <p>This would let me get to it from any where in my application.</p>
  
  <p>I'm getting a compile error though:</p>
  
  <pre><code>1&gt;shaderViewer.obj : error LNK2005: "class scnManger * sceneManger" (?sceneManger@@3PAVscnManger@@A) already defined in sceneManager.obj
  1&gt;C:\Users\Greg\Documents\Visual Studio 2010\Projects\ShaderViewer\Debug\ShaderViewer.exe : fatal error LNK1169: one or more multiply defined symbols found
  </code></pre>
  
  <p>right now I have 3 files</p>
  
  <p>sceneManger.h:</p>
  
  <pre><code>// Our global scene manger variable
  
  scnManger* sceneManger;
  </code></pre>
  
  <p>shadherViewer.cpp (winMain &amp; includes sceneManger.h):</p>
  
  <pre><code>scnManger shaderViewerScnManger; 
  sceneManger = &amp;shaderViewerScnManger;
  </code></pre>
  
  <p>sceneManger.cpp (includes sceneManger.h):</p>
  
  <p>I use the methods of my scene manger object in here for various things.</p>
  
  <p>First I would like to understand why I am getting the error, and am also open to any suggestions about a better way to handle this.  I wasn't sure if using a global variable like this was a good idea or not.</p>