I have a simpler test that exhibits the same problem. If I try to compile zlib as follows: cd ~/code git clone https://github.com/madler/zlib.git cd zlib emcmake cmake . -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=no make
and then run emcc libz.a -o libz-asm.js -s EXPORTED_FUNCTIONS="['deflate']" I get the error WARNING:root:function requested to be exported, but not implemented: "deflate" This is about the simplest test I can run. I also tried using the so file it makes and get the same error. What is the proper way to do this? --Robert On Mon, May 15, 2017 at 3:03 PM, Robert Hostetter < [email protected]> wrote: > 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.
