Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile/bundle tesseract into one binary

Tags:

c++

tesseract

Is it possible to compile tesseract into one binary?

I use the following to compile a program, but how is it possible to compile tesseract shared libraries into one binary so the program is 100% portable and you dont need tesseract to be installed on the current system?

Its not necessary to compile leptonica into the binary

g++ -std=c++11 txtocr.cpp -o txtocr -llept -ltesseract
like image 979
clarkk Avatar asked Oct 29 '22 10:10

clarkk


1 Answers

For that you need to use a Static Library, on unix systems they usually ends with the .a extension, and a Shared Library ends with .so

If you only have the .so (or .dylib on mac, .dll on windows) library of the tesseract, then you cannot compile it as a single binary.

like image 76
Tomaz Canabrava Avatar answered Nov 15 '22 05:11

Tomaz Canabrava