title: Linker error ( VS 2005 vs VS 2012 )
body: <p>I am trying to build <code>libxml2</code> library with VS 2012 compiling and linking against <code>DDK 7</code> headers and libraries. With VS 2005 it builds fine but with VS 2012, I am getting a linker error. On close inspection of symbols generated -</p>
  
  <p>On VS 2005,</p>
  
  <pre><code>Found __imp___vsnprintf
      Referenced in error.obj
      Referenced in xmlreader.obj
      Referenced in xmlwriter.obj
      Referenced in xmlstring.obj
      Loaded msvcrt.lib(msvcrt.dll)
  </code></pre>
  
  <p>On VS 2012,</p>
  
  <pre><code>error.obj     : error LNK2019: unresolved external symbol __imp__vsnprintf  
                                 referencedin function ___xmlRaiseError
  xmlreader.obj : error LNK2001: unresolved external symbol __imp__vsnprintf
  xmlwriter.obj : error LNK2001: unresolved external symbol __imp__vsnprintf
  xmlstring.obj : error LNK2001: unresolved external symbol __imp__vsnprintf
  </code></pre>
  
  <p><code>__imp__vsnprintf</code>, <code>__imp___vsnprintf</code> on VS 2012 and VS 2005 respectively for the same function ( Notice the extra <code>_</code> mark before <code>vsnprintf</code> in VS 2005). I looked at the compiler and linker options for the VS 2005 and VS 2012 in the build log. Both are the same. With the <code>showIncludes</code> option passed to the compiler, I see the exactly same set of headers used for the source files on both VS 2005 and VS 2012.</p>
  
  <p>Why is yet the symbol generation in VS 2012 being different ? How to resolve the issue with out compiling and linking against default headers and libs  ?</p>
  
  <p>Thanks.</p>