I have followed this link to get started with executing leptonica programs.However I am getting the following output when I run either of the cl commands given on the page.
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
I am working on a 64 bit windows.All the libraries mentioned in the above error are present in the lib folder.What might be the issue here?
The commands I have tried are (first one identical to what’s on link above):
cl /O2 /I "..\..\..\..\include" /I "..\..\..\..\include\leptonica"
/D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /EHsc /MD hellolept.c
/link /LIBPATH:"..\..\..\..\lib" liblept168.lib
and:
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
You need to sign in to view this answers