The C-API, which Tess4J wraps around, was re-introduced in 3.02. You would 
need to upgrade to that.

On Sunday, March 29, 2015 at 12:23:43 AM UTC-5, dhruv shah wrote:
>
> The Tesseract version is 3.01 and yes I installed it afterwards. When I'm 
> trying to use the tesseract from command line like so, 
> tesseract eurotext.tiff out
> then the out file has the correct output. 
> But when i try to consume the libraries, then the code fails.
> I tried to use C++ code also even there it fails.
>
> On Sunday, March 29, 2015 at 5:11:54 AM UTC+5:30, Quan Nguyen wrote:
>>
>> What version of Tesseract did you build? Did you install it afterwards, 
>> together with tessdata?
>>
>> On Saturday, March 28, 2015 at 12:31:26 PM UTC-5, dhruv shah wrote:
>>>
>>> Hello, 
>>>
>>> I'm using a java wrapper to access tesseract libraries. 
>>> Here is my code (default available on tess4j site):
>>>
>>> import net.sourceforge.tess4j.*;
>>>
>>> public class TesseractExample1 {
>>>
>>>     public static void main(String[] args) {
>>>         File imageFile = new File("eurotext.tiff");
>>>         Tesseract instance = null;
>>>         instance = Tesseract.getInstance(); // JNA Interface Mapping
>>>         
>>>         try {
>>>             String result = instance.doOCR(imageFile);
>>>             System.out.println(result);
>>>         } catch (TesseractException e) {
>>>             //System.err.println(e.getMessage());
>>>             e.printStackTrace();
>>>         }
>>>     }
>>> }
>>>
>>> I'm using 32 bit *jdk 1.8.0_40*
>>> I have a *64 bit linux 14.04*
>>> I'm getting the following error.
>>>
>>> Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking 
>>> up function 'TessBaseAPICreate': /usr/local/lib/libtesseract.so: undefined 
>>> symbol: TessBaseAPICreate
>>>     at com.sun.jna.Function.<init>(Function.java:208)
>>>     at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:536)
>>>     at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:513)
>>>     at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:499)
>>>     at com.sun.jna.Library$Handler.invoke(Library.java:199)
>>>     at com.sun.proxy.$Proxy0.TessBaseAPICreate(Unknown Source)
>>>     at net.sourceforge.tess4j.Tesseract.init(Tesseract.java:344)
>>>     at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:256)
>>>     at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:188)
>>>     at net.sourceforge.tess4j.Tesseract.doOCR(Tesseract.java:172)
>>>     at 
>>> com.meditab.central.TesseractExample1.main(TesseractExample1.java:22)
>>>
>>>
>>>
>>>
>>> command used to make the Tesseract+CUDA
>>> sudo ./configure --build=i386-linux-gnu LDFLAGS="-m32 
>>> -L/usr/local/cuda-6.5/lib -L/usr/lib/i386-linux-gnu" LIBS="-lcudart -lcuda" 
>>> CPPFLAGS="-m32 -I/usr/local/cuda-6.5/include" CXXFLAGS=-m32 CFLAGS=-m32
>>>
>>> command used to make LEPTONICA
>>> sudo ./configure CPPFLAGS=-m32 LDFLAGS="-m32 -L/usr/lib/i386-linux-gnu"  
>>> CXXFLAGS=-m32 CFLAGS=-m32
>>>
>>>
>>> Can someone please give me an idea as to what might be going wrong?
>>> I'll provide all the other necessary details.
>>>
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/ca27a8ad-572c-4722-987b-60049ad58047%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to