Error including tesseract Windows 10
-
Hello I have a problem. I want to use tesseract in my qt c++ application. I installed tesseract there: https://github.com/UB-Mannheim/tesseract/wiki
I have included in the .pro file:
LIBS += -L"C:\Program Files\Tesseract-OCR" -ltesseract-5
INCLUDEPATH +=But now the problem is, in C:\Program Files\Tesseract-OCR is no include directory.
So I went to this website: https://github.com/tesseract-ocr/tesseract and downloaded the zip file.There is an include directory: I tried to do this:
INCLUDEPATH += "C:/tesseract-5.3.1/include"
This is the path from the unpacked zip file. But then QT said this:
C:\Users\esche\Desktop\Programming\C++\VOC-GUI\vocabeltrainer\signin.h:25: error: In included file: 'tesseract/version.h' file not foundIn this folder C:/tesseract-5.3.1/include is only version.h.in
I dont kown what to do, please help!!
-
@MEsc You need to build Tesseract (source code you downloaded from https://github.com/tesseract-ocr/tesseract). Then you will have both, the libs and header files. See https://github.com/tesseract-ocr/tesseract/blob/main/INSTALL
-
@jsulm yeah, but I have problems with the instruction:
-
cd' to the directory containing the package's source code and type
./configure' to configure the package for your system. If you're
usingcsh' on an old version of System V, you might need to type
sh ./configure' instead to preventcsh' from trying to execute
configure' itself.Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for. -
Type `make' to compile the package.
-
Optionally, type `make check' to run any self-tests that come with
the package. -
Type `make install' to install the programs and any data files and
documentation. -
You can remove the program binaries and object files from the
source code directory by typingmake clean'. To also remove the files that
configure' created (so you can compile the package for
a different kind of computer), typemake distclean'. There is also a
make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
./configure -> does not work
-
-
@MEsc said in Error including tesseract Windows 10:
./configure -> does not work
Yes, because you're on Windows.
Maybe https://tesseract-ocr.github.io/tessdoc/Compiling.html#windows can help.