0

我已按照此链接开始执行 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 位 Windows。上述错误中提到的所有库都存在于 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
4

0 回答 0