Hello,
I installed tesseract from source on ubuntu 9.10. And when I try to
compile a simple code I got this error:
>> tesserCV.cpp:(.text+0x4a): undefined reference to
>> `TessBaseAPI::InitWithLanguage(char const*, char const*,
>> char const*, char const*, bool, int, char**)'
>> tesserCV.cpp:(.text+0x75): undefined reference to
>> `TessBaseAPI::TesseractRect(unsigned char const*, int, int,
>> int, int, int, int)'
>> tesserCV.cpp:(.text+0x7e): undefined reference to `TessBaseAPI::End()'
>> collect2: ld returned 1 exit status
I m using g++-4.4.1 and compiling using :
$ g++ -L/usr/lib/ -ltesseract_main -ltesseract_ccutil -
ltesseract_image -lcv -lhighgui tesserCV.cpp -o tesserCV
The libraries are in the /usr/lib directory and the source I m trying
to compile is listed below.
Can anyone help me get it right?
code:
int
main (int argc, char **argv)
{
IplImage *img = cvLoadImage(argv[1], 0) ;
TessBaseAPI api;
api.InitWithLanguage(NULL, NULL,language,NULL, false,0, NULL);
char* text = api.TesseractRect(imagedata,bytes_per_pixel,
bytes_per_line, 0, 0, width, height);
api.End();
cout << un_tesseract("eng",(const unsigned char *)img->imageData,1,img-
>width,img->width, img->height) << endl;
return 0;
}
--
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en.