On Wed, Jul 3, 2013 at 7:22 AM, ajmal azeez <[email protected]>wrote:
> i get an error as follows > ajmal@ajmal-Inspiron-5523:~/Desktop/project$ g++ sample.cpp phototest.tif > /usr/bin/ld:phototest.tif: file format not recognized; treating as linker > script > /usr/bin/ld:phototest.tif:1: syntax error > > collect2: ld returned 1 exit status > > Do you have any clue what you are doing? ;-) I think you should take time for studying... Zdenko > On Tuesday, July 2, 2013 10:23:22 PM UTC+5:30, zdenop wrote: > >> And what will happen if you remove that header file? >> >> Zdenko >> >> >> On Tue, Jul 2, 2013 at 10:03 AM, ajmal azeez <[email protected]>wrote: >> >>> When i try to compile the code given below i am getting an error message >>> "test_simple.cpp:4:25: fatal error: tessbaseapi.h: No such file or directory >>> compilation terminated." >>> >>> #include <baseapi.h> >>> #include <allheaders.h> >>> #include <sys/time.h> >>> #include <tessbaseapi.h> >>> >>> int main() { >>> >>> tesseract::TessBaseAPI *myOCR = >>> new tesseract::TessBaseAPI(); >>> >>> >>> printf("Leptonica version: %s\n", >>> getLeptonicaVersion()); >>> >>> if (myOCR->Init(NULL, "eng")) { >>> fprintf(stderr,"Could not initialize tesseract.\n"); >>> exit(1); >>> } >>> >>> Pix *pix = pixRead("phototest.tif"); >>> myOCR->SetImage(pix); >>> >>> char* outText = myOCR->GetUTF8Text(); >>> printf("OCR output:\n\n"); >>> printf(outText); >>> >>> myOCR->Clear(); >>> myOCR->End(); >>> delete [] outText; >>> pixDestroy(&pix); >>> return 0; >>> } >>> >>> >>> On Tuesday, July 2, 2013 12:24:43 PM UTC+5:30, zdenop wrote: >>> >>>> >>>> On Mon, Jul 1, 2013 at 7:33 PM, ajmal azeez <[email protected]>wrote: >>>> >>>>> Wer can i find tessbaeapi.h?? >>>>> >>>>> I never heard about it. Why do you think you need it? >>>> >>>> -- >>>> Zdenko >>>> >>>> >>>>> >>>>> On Thursday, March 29, 2012 8:22:55 PM UTC+5:30, Gustavo Souto wrote: >>>>>> >>>>>> Hi everyone, I need you help... >>>>>> >>>>>> I want to create a program in C++ with Tesseract, but when I try >>>>>> to compile the source code some errors appear. I don't know well how to >>>>>> link the libs to the source code, but I did do like this: >>>>>> ------------------------------******------ CODE >>>>>> ------------------------------******------------------------------*** >>>>>> ***--- >>>>>> >>>>>> #include <baseapi.h> >>>>>> #include <allheaders.h> >>>>>> #include <iostream> >>>>>> #include <opencv/cv.h> >>>>>> #include <opencv/highgui.h> >>>>>> >>>>>> using namespace std; >>>>>> >>>>>> int main() { >>>>>> >>>>>> tesseract::TessBaseAPI tess; >>>>>> >>>>>> tess.Init(NULL, "eng", tesseract::OEM_DEFAULT); >>>>>> cv::Mat image = cv::imread("/home/souto3/**Pictu****res/num.tif"); >>>>>> tess.SetImage((uchar*)image.**da****ta, image.size().width, >>>>>> image.size().height, image.channels(), image.step1()); >>>>>> tess.Recognize(0); >>>>>> const char* out = tess.GetUTF8Text(); >>>>>> >>>>>> cout << out; >>>>>> >>>>>> return 0; >>>>>> } >>>>>> ------------------------------ END CODE ------------------- >>>>>> >>>>>> -------------------- ERROR ------------------------------******-- >>>>>> /tmp/ccAUGhHc.o: In function `main': >>>>>> main.cpp:(.text+0x1b): undefined reference to >>>>>> `tesseract::TessBaseAPI::**TessB****aseAPI()' >>>>>> main.cpp:(.text+0x75): undefined reference to >>>>>> `cv::imread(std::basic_string<******char, std::char_traits<char>, >>>>>> std::allocator<char> > const&, int)' >>>>>> main.cpp:(.text+0x101): undefined reference to >>>>>> `tesseract::TessBaseAPI::**SetIm****age(unsigned char const*, int, int, >>>>>> int, int)' >>>>>> main.cpp:(.text+0x115): undefined reference to >>>>>> `tesseract::TessBaseAPI::**Recog****nize(ETEXT_DESC*)' >>>>>> main.cpp:(.text+0x124): undefined reference to >>>>>> `tesseract::TessBaseAPI::**GetUT****F8Text()' >>>>>> main.cpp:(.text+0x15c): undefined reference to >>>>>> `tesseract::TessBaseAPI::~**Tess****BaseAPI()' >>>>>> main.cpp:(.text+0x1c8): undefined reference to >>>>>> `tesseract::TessBaseAPI::~**Tess****BaseAPI()' >>>>>> /tmp/ccAUGhHc.o: In function `tesseract::TessBaseAPI::Init(******char >>>>>> const*, char const*, tesseract::OcrEngineMode)': >>>>>> main.cpp:(.text._**ZN9tesseract1****1TessBaseAPI4Init**EPKcS2_NS_**13O**crEngineModeE[**tesseract::**TessB**aseAPI::Init(**char >>>>>> const*, char const*, tesseract::OcrEngineMode)]+**0x4****f): undefined >>>>>> reference to `tesseract::TessBaseAPI::Init(******char const*, char >>>>>> const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> >>>>>> const*, GenericVector<STRING> const*, bool)' >>>>>> /tmp/ccAUGhHc.o: In function `cv::Mat::release()': >>>>>> main.cpp:(.text._**ZN2cv3Mat7rel****easeEv[cv::Mat::**release()]+**0x4**b): >>>>>> undefined reference to `cv::fastFree(void*)' >>>>>> ------------------------ END ERROR >>>>>> ------------------------------******------------------------------******---------- >>>>>> >>>>>> >>>>>> -- >>>>> -- >>>>> 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 >>>>> tesseract-oc...@**googlegroups.**com >>>>> >>>>> For more options, visit this group at >>>>> http://groups.google.com/**group**/tesseract-ocr?hl=en<http://groups.google.com/group/tesseract-ocr?hl=en> >>>>> >>>>> --- >>>>> 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-oc...@**googlegroups.**com. >>>>> >>>>> For more options, visit >>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out> >>>>> . >>>>> >>>>> >>>>> >>>> >>>> >>> On Tuesday, July 2, 2013 12:24:43 PM UTC+5:30, zdenop wrote: >>>> >>>> >>>> On Mon, Jul 1, 2013 at 7:33 PM, ajmal azeez <[email protected]>wrote: >>>> >>>>> Wer can i find tessbaeapi.h?? >>>>> >>>>> I never heard about it. Why do you think you need it? >>>> >>>> -- >>>> Zdenko >>>> >>>> >>>>> >>>>> On Thursday, March 29, 2012 8:22:55 PM UTC+5:30, Gustavo Souto wrote: >>>>>> >>>>>> Hi everyone, I need you help... >>>>>> >>>>>> I want to create a program in C++ with Tesseract, but when I try >>>>>> to compile the source code some errors appear. I don't know well how to >>>>>> link the libs to the source code, but I did do like this: >>>>>> ------------------------------******------ CODE >>>>>> ------------------------------******------------------------------*** >>>>>> ***--- >>>>>> >>>>>> #include <baseapi.h> >>>>>> #include <allheaders.h> >>>>>> #include <iostream> >>>>>> #include <opencv/cv.h> >>>>>> #include <opencv/highgui.h> >>>>>> >>>>>> using namespace std; >>>>>> >>>>>> int main() { >>>>>> >>>>>> tesseract::TessBaseAPI tess; >>>>>> >>>>>> tess.Init(NULL, "eng", tesseract::OEM_DEFAULT); >>>>>> cv::Mat image = cv::imread("/home/souto3/**Pictu****res/num.tif"); >>>>>> tess.SetImage((uchar*)image.**da****ta, image.size().width, >>>>>> image.size().height, image.channels(), image.step1()); >>>>>> tess.Recognize(0); >>>>>> const char* out = tess.GetUTF8Text(); >>>>>> >>>>>> cout << out; >>>>>> >>>>>> return 0; >>>>>> } >>>>>> ------------------------------ END CODE ------------------- >>>>>> >>>>>> -------------------- ERROR ------------------------------******-- >>>>>> /tmp/ccAUGhHc.o: In function `main': >>>>>> main.cpp:(.text+0x1b): undefined reference to >>>>>> `tesseract::TessBaseAPI::**TessB****aseAPI()' >>>>>> main.cpp:(.text+0x75): undefined reference to >>>>>> `cv::imread(std::basic_string<******char, std::char_traits<char>, >>>>>> std::allocator<char> > const&, int)' >>>>>> main.cpp:(.text+0x101): undefined reference to >>>>>> `tesseract::TessBaseAPI::**SetIm****age(unsigned char const*, int, int, >>>>>> int, int)' >>>>>> main.cpp:(.text+0x115): undefined reference to >>>>>> `tesseract::TessBaseAPI::**Recog****nize(ETEXT_DESC*)' >>>>>> main.cpp:(.text+0x124): undefined reference to >>>>>> `tesseract::TessBaseAPI::**GetUT****F8Text()' >>>>>> main.cpp:(.text+0x15c): undefined reference to >>>>>> `tesseract::TessBaseAPI::~**Tess****BaseAPI()' >>>>>> main.cpp:(.text+0x1c8): undefined reference to >>>>>> `tesseract::TessBaseAPI::~**Tess****BaseAPI()' >>>>>> /tmp/ccAUGhHc.o: In function `tesseract::TessBaseAPI::Init(******char >>>>>> const*, char const*, tesseract::OcrEngineMode)': >>>>>> main.cpp:(.text._**ZN9tesseract1****1TessBaseAPI4Init**EPKcS2_NS_**13O**crEngineModeE[**tesseract::**TessB**aseAPI::Init(**char >>>>>> const*, char const*, tesseract::OcrEngineMode)]+**0x4****f): undefined >>>>>> reference to `tesseract::TessBaseAPI::Init(******char const*, char >>>>>> const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> >>>>>> const*, GenericVector<STRING> const*, bool)' >>>>>> /tmp/ccAUGhHc.o: In function `cv::Mat::release()': >>>>>> main.cpp:(.text._**ZN2cv3Mat7rel****easeEv[cv::Mat::**release()]+**0x4**b): >>>>>> undefined reference to `cv::fastFree(void*)' >>>>>> ------------------------ END ERROR >>>>>> ------------------------------******------------------------------******---------- >>>>>> >>>>>> >>>>>> -- >>>>> -- >>>>> 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 >>>>> tesseract-oc...@**googlegroups.**com >>>>> >>>>> For more options, visit this group at >>>>> http://groups.google.com/**group**/tesseract-ocr?hl=en<http://groups.google.com/group/tesseract-ocr?hl=en> >>>>> >>>>> --- >>>>> 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-oc...@**googlegroups.**com. >>>>> >>>>> For more options, visit >>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out> >>>>> . >>>>> >>>>> >>>>> >>>> >>>> >>> On Tuesday, July 2, 2013 12:24:43 PM UTC+5:30, zdenop wrote: >>>> >>>> >>>> On Mon, Jul 1, 2013 at 7:33 PM, ajmal azeez <[email protected]>wrote: >>>> >>>>> Wer can i find tessbaeapi.h?? >>>>> >>>>> I never heard about it. Why do you think you need it? >>>> >>>> -- >>>> Zdenko >>>> >>>> >>>>> >>>>> On Thursday, March 29, 2012 8:22:55 PM UTC+5:30, Gustavo Souto wrote: >>>>>> >>>>>> Hi everyone, I need you help... >>>>>> >>>>>> I want to create a program in C++ with Tesseract, but when I try >>>>>> to compile the source code some errors appear. I don't know well how to >>>>>> link the libs to the source code, but I did do like this: >>>>>> ------------------------------******------ CODE >>>>>> ------------------------------******------------------------------*** >>>>>> ***--- >>>>>> >>>>>> #include <baseapi.h> >>>>>> #include <allheaders.h> >>>>>> #include <iostream> >>>>>> #include <opencv/cv.h> >>>>>> #include <opencv/highgui.h> >>>>>> >>>>>> using namespace std; >>>>>> >>>>>> int main() { >>>>>> >>>>>> tesseract::TessBaseAPI tess; >>>>>> >>>>>> tess.Init(NULL, "eng", tesseract::OEM_DEFAULT); >>>>>> cv::Mat image = cv::imread("/home/souto3/**Pictu****res/num.tif"); >>>>>> tess.SetImage((uchar*)image.**da****ta, image.size().width, >>>>>> image.size().height, image.channels(), image.step1()); >>>>>> tess.Recognize(0); >>>>>> const char* out = tess.GetUTF8Text(); >>>>>> >>>>>> cout << out; >>>>>> >>>>>> return 0; >>>>>> } >>>>>> ------------------------------ END CODE ------------------- >>>>>> >>>>>> -------------------- ERROR ------------------------------******-- >>>>>> /tmp/ccAUGhHc.o: In function `main': >>>>>> main.cpp:(.text+0x1b): undefined reference to >>>>>> `tesseract::TessBaseAPI::**TessB****aseAPI()' >>>>>> main.cpp:(.text+0x75): undefined reference to >>>>>> `cv::imread(std::basic_string<******char, std::char_traits<char>, >>>>>> std::allocator<char> > const&, int)' >>>>>> main.cpp:(.text+0x101): undefined reference to >>>>>> `tesseract::TessBaseAPI::**SetIm****age(unsigned char const*, int, int, >>>>>> int, int)' >>>>>> main.cpp:(.text+0x115): undefined reference to >>>>>> `tesseract::TessBaseAPI::**Recog****nize(ETEXT_DESC*)' >>>>>> main.cpp:(.text+0x124): undefined reference to >>>>>> `tesseract::TessBaseAPI::**GetUT****F8Text()' >>>>>> main.cpp:(.text+0x15c): undefined reference to >>>>>> `tesseract::TessBaseAPI::~**Tess****BaseAPI()' >>>>>> main.cpp:(.text+0x1c8): undefined reference to >>>>>> `tesseract::TessBaseAPI::~**Tess****BaseAPI()' >>>>>> /tmp/ccAUGhHc.o: In function `tesseract::TessBaseAPI::Init(******char >>>>>> const*, char const*, tesseract::OcrEngineMode)': >>>>>> main.cpp:(.text._**ZN9tesseract1****1TessBaseAPI4Init**EPKcS2_NS_**13O**crEngineModeE[**tesseract::**TessB**aseAPI::Init(**char >>>>>> const*, char const*, tesseract::OcrEngineMode)]+**0x4****f): undefined >>>>>> reference to `tesseract::TessBaseAPI::Init(******char const*, char >>>>>> const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> >>>>>> const*, GenericVector<STRING> const*, bool)' >>>>>> /tmp/ccAUGhHc.o: In function `cv::Mat::release()': >>>>>> main.cpp:(.text._**ZN2cv3Mat7rel****easeEv[cv::Mat::**release()]+**0x4**b): >>>>>> undefined reference to `cv::fastFree(void*)' >>>>>> ------------------------ END ERROR >>>>>> ------------------------------******------------------------------******---------- >>>>>> >>>>>> >>>>>> -- >>>>> -- >>>>> 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 >>>>> tesseract-oc...@**googlegroups.**com >>>>> >>>>> For more options, visit this group at >>>>> http://groups.google.com/**group**/tesseract-ocr?hl=en<http://groups.google.com/group/tesseract-ocr?hl=en> >>>>> >>>>> --- >>>>> 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-oc...@**googlegroups.**com. >>>>> >>>>> For more options, visit >>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out> >>>>> . >>>>> >>>>> >>>>> >>>> >>>> -- >>> -- >>> 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 >>> tesseract-oc...@**googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/**group/tesseract-ocr?hl=en<http://groups.google.com/group/tesseract-ocr?hl=en> >>> >>> --- >>> 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-oc...@**googlegroups.com. >>> For more options, visit >>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>> . >>> >>> >>> >> >> -- > -- > 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 > > --- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 --- 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]. For more options, visit https://groups.google.com/groups/opt_out.

