title: #pragma once or include guards not working on extern funcs
body: <p>I'm experiencing a very strange (and annoying) linker error on my project.</p>
  
  <p>Say for example I have the file KernelExports.h:</p>
  
  <pre><code>#pragma once
  
  extern "C"
  {
      DWORD* KeTimeStampBundle;
      DWORD KeGetCurrentProcessType();
      //etc...
  }
  </code></pre>
  
  <p>I then <code>#include</code> this in my stdafx.h and then add <code>#include "stdafx.h"</code> all all my *.cpp files. The problem is that now whenever I build I get a stream of linker errors: <code>LNK2005: KeTimeStampBundle already defined in stdafx.obj</code>. This should not be happening since the header file is only included in one file and is protected with include guards. The errors stop once I comment out the whole <code>extern "C"</code> block so I know that is what is causing the issue.</p>
  
  <p>What's even stranger is when I add all these source files to a new project it builds without any problems. I don't see what the issue is here, can anyone enlighten me?</p>
  
  <p>My IDE is Visual Studio 2008.</p>