hi, i want to run tesseract with this code :
#include <tesseract/baseapi.h>
#include <leptonica/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/testing/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;
}
but raised this error:
> /home/myuser/local/lib/libtesseract.so: undefined reference to
> `pixaDisplayTiledInColumns'
>
/home/myuser/local/lib/libtesseract.so: undefined reference to
> `pixReadFromMultipageTiff'
> /home/myuser/local/lib/libtesseract.so: undefined reference to
> `pixReadMemFromMultipageTiff'
> /home/myuser/local/lib/libtesseract.so: undefined reference to
> `pixGenerateHalftoneMask'
> collect2: error: ld returned 1 exit status
anyone could help me how resolve it ?
thanks
--
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 https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/5456fe81-9f67-4e3d-9610-8adeb08a3602%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.