title: declaration of 'x' has a different language linkage
body: <p>When I build source, it throws an error: <code>declaration of 'globalMemTrace' has a different language linkage</code></p>
  
  <pre><code>#ifdef MEMDEBUG_SIMULATIONS
  #include "mem-trace.h"
  MemTrace *globalMemTrace;
  #endif
  
  // omitted unrelated parts    
  
  int Tcl_AppInit(Tcl_Interp *interp)
  {
  #ifdef MEMDEBUG_SIMULATIONS
      extern MemTrace *globalMemTrace;
      globalMemTrace = new MemTrace;
  #endif
  }
  </code></pre>
  
  <p>I've googled several times for it. Some said that it is due to a bug if <code>clang</code> and some said tricks in using <code>extern</code> differently may solve it.</p>
  
  <p>But since I am not such a profession, I've tried some of them and failed to solve it. Is there any nice way to deal with it?</p>
  
  <p>It's written in C++ and the problem occurs at <code>extern MemTrace *globalMemTrace;</code></p>