ffttyy
ffttyy

Reputation: 864

Qt Can't use OCR Tesseract with OpenCV 3.2 Ubuntu

I am trying to use cv::text::OCRTesseract module but I get error:

undefined reference to `cv::text::OCRTesseract::create(char const*, char const*, char const*, int, int)' 

I installed Tesseract and tested it from command line.

Here how my ocr.hpp file looks like:

enter image description here

The red line tells unexpected token 'create'

Is there any missing library or unlinked library or something else?

I didn't find a valid solution, please help!

Upvotes: 1

Views: 288

Answers (1)

Venemo
Venemo

Reputation: 19067

It is not enough to just include a header file of a library, you also need to link your app to the library. I have no experience with OpenCV and Tesseract, but it sounds like you need to add a reference to both libraries.

If you use Qt Creator, you can find out how to do this in this manual page.

Upvotes: 2

Related Questions