我试图编译的libpng为Windows Mobile 6,但是我白马得到以下链接器错误:
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
编译与/ MD选项,我的主要项目之间同样进行。 zlib的和libpng。
当/ MT来代替,还是有错误,但略有不同:
error LNK2019: unresolved external symbol __iob_func referenced in function png_default_error
error LNK2019: unresolved external symbol abort referenced in function png_longjmp
这带来了一些问题。
- 是什么
__imp___iob_func
和__imp_abort
? - 他们在哪里,在实施? 另外,如何对它们的引用被排除在外?
我的libpng的编译器选项:
/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-
图书管理员选项:
/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
我的项目(libpngStreamWrap)编译器选项:
/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
链接选项:
/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