我正在尝试为 Windows Mobile 6 编译 libpng,但我不断收到以下链接器错误:
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