title: Getting linker error in VC++11 when linking with python27.lib
body: <p>I'm porting a project from VC10 to VC11, and I'm getting the following errors when linking the component which contains the <code>initXxx</code> function called by Python when the DLL is loaded:</p>
  
  <pre><code> 1&gt;PyCAL.obj : error LNK2019: unresolved external symbol __imp__PyErr_SetString referenced in function __catch$_initPyCAL$0
   1&gt;PyCAL.obj : error LNK2019: unresolved external symbol __imp__PyErr_Occurred referenced in function __catch$_initPyCAL$1
  </code></pre>
  
  <p>The funny thing is that there was no problem in VC10, although in both cases, <code>dumpbin /exports</code> on <code>python27.lib</code> shows only <code>_PyErr_SetString</code>, but <code>dumpbin /symbols</code> on the object file shows <code>__imp__PyErr_SetString</code>.  (I've tried both with and without SAFESEH, as that has caused problems in the past.)</p>
  
  <p>For what it's worth, here's the invocation of the linker from the log file:</p>
  
  <pre><code>     C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"..\..\..\Build\VC11.0\Debug-32bit\PyCAL.pyd" /INCREMENTAL:NO /NOLOGO /LIBPATH:C:\Python27\libs /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"..\..\..\Build\VC11.0\Debug-32bit\\PyCAL.pdb" /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE /SWAPRUN:NET /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"..\..\..\Build\VC11.0\Debug-32bit\\PyCAL.lib" /MACHINE:X86 /SAFESEH:NO /DLL "..\..\..\Build\VC11.0\Debug-32bit\obj\PyCAL\Loader.obj"
       "..\..\..\Build\VC11.0\Debug-32bit\obj\PyCAL\PyCAL.obj"
  </code></pre>
  
  <p>Does anyone else have any experience with this, and can tell me what I'm doing wrong?</p>