Important: Please read the Qt Code of Conduct -

Linking with Tesseract

  • Hi,
    I installed tesseract-ocr and tesseract-ocr-dev packages on Ubuntu via Synaptic package manager
    Qt Creator IDE recognized tesseract includes such as:

    #include <tesseract/baseapi.h>
    #include <tesseract/globals.h>


    but when I add:

    LIBS += -ltesseract

    to .pro file I get:

    /usr/bin/ld: cannot find -ltesseract

    why such?

    Does anybody have an experience and know how to install and include tesseract to Qt project on Ubuntu?
    Thank you.

  • I think you need to add the path to the library too.

    I have moved this reply from one of the other threads mentioned below, to clean up the discussion.

  • Pavel, please don't double post questions in multiple topics. -I'm closing this one.-

    After I noticed you posted the same question three times, and consulting with other moderators, I have changed the solution. The topics you posted in are all open again, but I have deleted all but one of your posts on this issue and created a separate, new topic for it. Please stick to only that topic.

    The original questions were in "these":/forums/viewthread/3014/ "three":/forums/viewthread/16491/ "topics":/forums/viewthread/14931/ (all on ORC).

  • Does anybody succeed to build and run this project:


    I built tesseract using visual studio ( vs2008 project ) and several .lib generated and I added them to .pro file together with include .h files but still a lot of "undefined references...".

    If yes can you share the exact tesseract libs and includes you used on Windows XP/7 x86/x64 ?

    Thanks in advance.

Log in to reply