Hi. Have you solved your problem ? Do you have whole source code on cloud ? 
Or on local HDD ?

On Friday, November 13, 2015 at 3:41:04 PM UTC+2, Greg Hines wrote:
>
> Hi, I'm trying to build some example code from 
> https://code.google.com/p/tesseract-ocr/wiki/APIExample. I have the 
> following:
> #include <tesseract/api/baseapi.h> 
> #include <leptonica-1.72/src/allheaders.h> 
>
> int main() 
> { 
>    char *outText; 
>
>    tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI(); 
>    // Initialize tesseract-ocr with English, without specifying tessdata 
> path 
>    if (api->Init(NULL, "eng")) { 
>        fprintf(stderr, "Could not initialize tesseract.\n"); 
>        exit(1); 
>    } 
>
>    // Open input image with leptonica library 
>    Pix *image = pixRead("/usr/src/tesseract-3.02/phototest.tif"); 
>    api->SetImage(image); 
>    // Get OCR result 
>    outText = api->GetUTF8Text(); 
>    printf("OCR output:\n%s", outText); 
>
>    // Destroy used object and release memory 
>    api->End(); 
>    delete [] outText; 
>    pixDestroy(&image); 
>
>    return 0; 
> }
>
>
> I've changed the include commands slightly to help point where the header 
> files actually are on my computer. I compile using:
> g++ -I /home/ggdhines/github/ -I 
> /home/ggdhines/github/python-tesseract/vs2008/includes/tesseract/ -I 
> /home/ggdhines/source_code/ tess.cpp
>
> The first two -I's are for tesseract headers, the third is for leptonica. 
> I then get the following errors:
> /home/ggdhines/github/tesseract/api/baseapi.h:96:9: error: ‘TessCallback4’ 
> does not name a type
>  typedef TessCallback4<const UNICHARSET &, int, PageIterator *, Pix *>
>          ^
> /home/ggdhines/github/tesseract/api/baseapi.h:747:26: error: 
> ‘TruthCallback’ has not been declared
>    void InitTruthCallback(TruthCallback *cb) { truth_cb_ = cb; }
>                           ^
> /home/ggdhines/github/tesseract/api/baseapi.h:865:3: error: 
> ‘TruthCallback’ does not name a type
>    TruthCallback *truth_cb_;           /// fxn for setting truth_* in 
> WERD_RES
>    ^
> /home/ggdhines/github/tesseract/api/baseapi.h: In member function ‘void 
> tesseract::TessBaseAPI::InitTruthCallback(int*)’:
> /home/ggdhines/github/tesseract/api/baseapi.h:747:47: error: ‘truth_cb_’ 
> was not declared in this scope
>    void InitTruthCallback(TruthCallback *cb) { truth_cb_ = cb; }
>
> Any suggestions would be welcome.
> Thanks,
> Greg Hines
>

-- 
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 tesseract-ocr+unsubscr...@googlegroups.com.
To post to this group, send email to tesseract-ocr@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/09b53135-0257-4670-8388-79d68f6e84c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to