Hi all
Just trying to check where things are wrong here. I am trying to launch the example demo of the TTesseractOCR4 library (
https://github.com/r1me/TTesseractOCR4) using Lazarus 2.0.10 and FPC 3.2.0.
I have all the DLL's copied to /bin folder as directed, specifically, 'pvt.cppan.demo.google.tesseract.libtesseract-master.dll'. And I have checked that its name in my folder matches how it is written in code. I also have the 'tessdata' folder setup and I downloaded the files stated into that.
The example compiles OK, and I try to run the exe from the root of the bin folder as directed, where the DLLs are, and where the tessdata fiolder is, and where the sample file is. But, it keeps throwing an exception because LoadLibrary is failing to load the 'pvt.cppan.demo.google.tesseract.libtesseract-master.dll' library.
The syntax in the project on Line 469 of tesseractocr.capi.pas shows :
hTesseractLib := LoadLibrary({$IFDEF FPC}libtesseract{$ELSE}PChar(libtesseract){$ENDIF});
if (hTesseractLib <> 0) then ...
and libtesseract is populated by Line 38 in tesseractocr.consts.pas :
{$DEFINE USE_CPPAN_BINARIES}
const
{$IFDEF USE_CPPAN_BINARIES}
libleptonica = {$IFDEF Linux}'libpvt.cppan.demo.danbloomberg.leptonica-1.76.0.so'{$ELSE}'pvt.cppan.demo.danbloomberg.leptonica-1.76.0.dll'{$ENDIF};
libtesseract = {$IFDEF Linux}'libpvt.cppan.demo.google.tesseract.libtesseract-master.so'{$ELSE}'pvt.cppan.demo.google.tesseract.libtesseract-master.dll'{$ENDIF};
{$ELSE}
Can anyone see why the compiled exe might not be working and throwing the error 'Tesseract library is not loaded' as defined in Line 163 of tesseractocr.pas? More to the point, do any of you have the time to try it to see if the same thing happens on your systems?
Many thanks