title: Linker error "unresolved external symbol __imp___iob_func" in libpng.lib
body: <p>I am trying to compile libpng for Windows Mobile 6, but i kep getting the following linker errors:</p>
  
  <pre><code>error LNK2019: unresolved external symbol __imp___iob_func referenced in function png_default_error libpng.lib
  error LNK2019: unresolved external symbol __imp_abort referenced in function png_longjmp
  </code></pre>
  
  <p>Compilation is done with /MD option, same between my main project. zlib and libpng.</p>
  
  <p>When /MT is used instead, there are still errors, but slightly different:</p>
  
  <pre><code>error LNK2019: unresolved external symbol __iob_func referenced in function png_default_error
  error LNK2019: unresolved external symbol abort referenced in function png_longjmp
  </code></pre>
  
  <p>That brings several questions.</p>
  
  <ol>
  <li>What are <code>__imp___iob_func</code> and <code>__imp_abort</code>?</li>
  <li>Where are they implemented at? Alternatively, how can a reference to them be excluded?</li>
  </ol>
  
  <p>My libpng compiler options:</p>
  
  <pre><code>/Od /I "..\lib\zlib-1.2.7" /I "..\lib\lpng1512" /D "_DEBUG" /D "_WIN32_WCE=0x502" /D "UNDER_CE" /D "WIN32_PLATFORM_PSPC" /D "WINCE" /D "DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "LIBPNG_EXPORTS" /D "ARM" /D "_ARM_" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /MDd /fp:fast /GR- /Fo"Windows Mobile 6 Professional SDK (ARMV4I)\Debug/" /Fd"Windows Mobile 6 Professional SDK (ARMV4I)\Debug/vc80.pdb" /W3 /nologo /c /Zi /TC /QMFPE-
  </code></pre>
  
  <p>librarian options:</p>
  
  <pre><code>/OUT:"Windows Mobile 6 Professional SDK (ARMV4I)\Debug\libpng.lib" /LIBPATH:"C:\Program Files\Windows Mobile 6 SDK\PocketPC\Lib\Armv4i" /NOLOGO /NODEFAULTLIB Coredll.lib /SUBSYSTEM:WINDOWSCE,5.02
  </code></pre>
  
  <p>My project (libpngStreamWrap) compiler options:</p>
  
  <pre><code>/Od /I "..\lib\lpng1512" /D "_DEBUG" /D "_WIN32_WCE=0x502" /D "UNDER_CE" /D "WIN32_PLATFORM_PSPC" /D "WINCE" /D "DEBUG" /D "_LIB" /D "ARM" /D "_ARM_" /D "_UNICODE" /D "UNICODE" /D "_WINDLL" /Gm /EHsc /MDd /fp:fast /GR- /Yu"stdafx.h" /Fp"Windows Mobile 6 Professional SDK (ARMV4I)\Debug/libpngStreamWrap.pch" /Fo"Windows Mobile 6 Professional SDK (ARMV4I)\Debug/" /Fd"Windows Mobile 6 Professional SDK (ARMV4I)\Debug/vc80.pdb" /W3 /nologo /c /Zi /TP
  </code></pre>
  
  <p>linker options:</p>
  
  <pre><code>/OUT:"Windows Mobile 6 Professional SDK (ARMV4I)\Debug\libpngStreamWrap.dll" /NOLOGO /DLL /MANIFEST:NO /NODEFAULTLIB:"oldnames.lib" /DYNAMICBASE /NXCOMPAT /ERRORREPORT:PROMPT coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib "..\libpng\windows mobile 6 professional sdk (armv4i)\debug\libpng.lib" "..\zlib\windows mobile 6 professional sdk (armv4i)\debug\zlib.lib"  /SUBSYSTEM:WINDOWSCE,5.02 /VERBOSE:lib
  </code></pre>