我已经按照这个link开始执行leptonica程序。但是当我运行页面上给出的任何一个cl命令时,我得到以下输出。
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
hellolept.c
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
/out:hellolept.exe
/LIBPATH:..\..\..\..\lib
zlib125-static-mtdll.lib
libpng143-static-mtdll.lib
libjpeg8c-static-mtdll.lib
libtiff394-static-mtdll.lib
giflib416-static-mtdll.lib
liblept168-static-mtdll.lib
hellolept.obj
hellolept.obj : error LNK2019: unresolved external symbol getImagelibVersions re
ferenced in function main
hellolept.obj : error LNK2019: unresolved external symbol getLeptonicaVersion re
ferenced in function main
hellolept.exe : fatal error LNK1120: 2 unresolved externals
我正在开发一个64位的窗口。上面错误中提到的所有库都存在于lib文件夹中。这可能是什么问题?
我尝试的命令是(第一个与上面的链接相同):
cl /O2 /I "..\..\..\..\include" /I "..\..\..\..\include\leptonica"
/D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /MD hellolept.c
/link /LIBPATH:"..\..\..\..\lib" liblept168.lib
和
cl /O2 /I "..\..\..\..\include" /I "..\..\..\..\include\leptonica"
/D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /MD hellolept.c
/link /LIBPATH:"..\..\..\..\lib" zlib125-static-mtdll.lib
libpng143-static-mtdll.lib libjpeg8c-static-mtdll.lib
libtiff394-static-mtdll.lib giflib416-static-mtdll.lib
liblept168-static-mtdll.lib