otiai10/gosseract

Linking and DLL runtime issues on Windows

antxv opened this issue · 1 comments

antxv commented

I am attempting to use this package on Windows.

I am using MSYS2 to install tesseract, following the installation instructions:

pacman -S mingw-w64-x86_64-tesseract-ocr
pacman -S mingw-w64-x86_64-tesseract-data-eng

Then I install this package:

go get github.com/otiai10/gosseract/v2

The first problem is a linking error:

cannot find -lleptonica: No such file or directory

I managed to work around this issue by updating the preprocessflags_x.go file from this package. I replaced "-lleptonica" with "-llept".

The second problem is a runtime error:

the procedure entry point _ZSt17_istream_extractRSiPcx could not be located in the dynamic link library C:\msys64\mingw64\bin\libtesseract-5.dll

I am stuck on this one. Any thoughts on how I could work around this issue?

antxv commented

For the second issue, I used the tesseract API directly, and I had the same issue. So, the first issue is a problem with this package, but the second problem is not.