title: Visual Studio 2017 expects extra underscore in function names
body: <p>I have a static library from a 3rd party and the header. The functions are declared as <code>extern "C"</code> in the header and they are exported in the library - I checked with <code>dumpbin /exports library.lib</code>. </p>
  
  <p>When trying to use the library I included the header and added the library to Linker->Input. The code compiles, but it doesn't link because the linker expects an extra underscore for the functions defined in the library. For example if in the header I have:</p>
  
  <pre><code>extern "C"
  {
      int serialInit();
  }
  </code></pre>
  
  <p><code>dumpbin</code> shows me:</p>
  
  <pre><code>Exports
     ordinal    name
           6    serialInit
  </code></pre>
  
  <p>and the linker gives me:</p>
  
  <pre><code>error LNK2019: unresolved external symbol _serialInit referenced in function _main
  </code></pre>
  
  <p>Do you know why Visual Studio expects the extra underscore in the function name? Any ideas on how to solve this?</p>