title: fatal error LNK1127: library is corrupt --> after adding extern "C" to function prototype
body: <p>I have an external library made using C code. I wish to call a function from the library in my c++ project. The original format of the function prototype was.</p>
  
  <pre><code>extern void butterThreeBp(real_T eml_dt, real_T eml_fl, real_T eml_fu, real_T eml_b3[7], real_T eml_a3[7]);
  </code></pre>
  
  <p>And this caused the following linker error in MSVC2008</p>
  
  <pre><code>error LNK2019: unresolved external symbol "void __cdecl butterThreeBp(double,double,double,double * const,double * const)" (?butterThreeBp@@YAXNNNQAN0@Z) referenced in function "public: void __thiscall myThread::setDRNLc(double)" (?setDRNLc@myThread@@QAEXN@Z)
  </code></pre>
  
  <p>I then changed this prototype to </p>
  
  <pre><code>extern "C" void ...
  </code></pre>
  
  <p>and then get the following error:</p>
  
  <pre><code>\butterThreeBp.lib : fatal error LNK1127: library is corrupt
  </code></pre>
  
  <p>I have rebuilt the library numerous times and am pretty certain that it is not corrupt. Any help would be great. Thanks!!</p>