title: error C2894: templates cannot be declared to have 'C' linkage
body: <p>I got </p>
  
  <pre><code>error C2894: templates cannot be declared to have 'C' linkage
  </code></pre>
  
  <p>when i try to compile my C++ project.</p>
  
  <p>all error point me to vc++ files</p>
  
  <pre><code>1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(32): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(120): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(133): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(256): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(279): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(375): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(474): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(486): error C2039: 'memcmp' : is not a member of '`global namespace''
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(486): error C3861: 'memcmp': identifier not found
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(491): error C2039: 'strlen' : is not a member of '`global namespace''
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(491): error C3861: 'strlen': identifier not found
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(511): error C2039: 'memchr' : is not a member of '`global namespace''
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(511): error C3861: 'memchr': identifier not found
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(522): error C2039: 'memset' : is not a member of '`global namespace''
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(522): error C3861: 'memset': identifier not found
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(568): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(571): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(574): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(577): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(580): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(583): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(586): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(589): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(592): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(596): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(600): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(604): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(608): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(611): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(614): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(617): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(622): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(625): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\iosfwd(628): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\limits(80): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\limits(133): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\limits(139): error C2894: templates cannot be declared to have 'C' linkage
  1&gt;c:\program files\microsoft visual studio 10.0\vc\include\limits(139): fatal error C1003: error count exceeds 100; stopping compilation
  </code></pre>
  
  <p>what are these errors and how i can solve them.'
  these errors appear suddenly while before i never see these errors.</p>
  
  <p><strong>in the project i am working on, i never <em>use extern C</em></strong></p>
  
  <p>thanks</p>