I've been working to get tesseract 4.0 compiled using emscripten so I can
use it in a javascript project.  It has a dependency of leptonica, which
has a ton of dependencies as well.  All told there are 8 libraries in
total.  One by one I worked through getting them to compile using emcmake
or emmake, often I had to modify their CMakeLists.txt file to get them to
allow me to pass the location of the libraries on the command line during
the build process.  I have them all compiled now as static libraries.  I'm
now trying to turn them into one big javascript file.  I'm using this
command:

emcc libz.a libgif.a libjpeg.a liblzma.a libpng.a libtiff.a libleptonica.a
liblibtesseract.a -o javascript/libtesseract-asm.js -s
EXPORTED_FUNCTIONS="['TessBaseAPICreate', 'TessBaseAPIInit3',
'TessBaseAPISetImage2', 'TessBaseAPIRecognize', 'TessBaseAPIGetUTF8Text',
'TessDeleteText','TessBaseAPIEnd','TessBaseAPIDelete','pixDestroy',
'pixRead','pixReadMem']"

Two of those exported functions are from Leptonica (the last two) and the
rest are from Tesseract.  When I run that command without the export
functions it works makes a 3.5MB javascript file with a ton of mangled
looking names.  When I try to use the export functions it says they don't
exist.  I have tried to follow the directions on the site as best I can,
but I don't understand where to go from here.  If someone could point me in
the right direction I would appreciate it.

--Robert

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to