title: Link tesseract libs with QtCreator
body: <p>I'm trying to run a C++ program which is based on tesseract API and I'm using QtCreator as IDE on Ubuntu, in order to perfom page layout analysis :</p>
  
  <pre><code>int main(void)
  {
  int left, top, right, bottom;
  
  tesseract::TessBaseAPI tessApi;
  tessApi.InitForAnalysePage();
  
  cv::Mat img = cv::imread("document.png");
  tessApi.SetImage(reinterpret_cast&lt;const uchar*&gt;(img.data), img.size().width, img.size().height, img.channels(), img.step1());
  
  tesseract::PageIterator *iter = tessApi.AnalyseLayout();
  
  while (iter-&gt;Next(tesseract::RIL_BLOCK))
      iter-&gt;BoundingBox( tesseract::RIL_BLOCK, &amp;left, &amp;top, &amp;right, &amp;bottom);
  
  return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>But in turn I got these kind of errors confirming that tesseract and Qt aren't linked :</p>
  
  <pre><code>main.cpp:11: error: undefined reference to `tesseract::TessBaseAPI::TessBaseAPI()'
  main.cpp:12: error: undefined reference to `tesseract::TessBaseAPI::InitForAnalysePage()'
  main.cpp:16: error: undefined reference to `tesseract::TessBaseAPI::SetImage(unsigned char const*, int, int, int, int)'
  main.cpp:18: error: undefined reference to `tesseract::TessBaseAPI::AnalyseLayout()'
  </code></pre>
  
  <p>Here is my .pro file :</p>
  
  <pre><code>INCLUDEPATH += /usr/local/include/opencv \
             /usr/include/tesseract
  
  LIBS += -L"/usr/local/opencv/lib"   -lopencv_calib3d \
                                  -lopencv_contrib \
                                  -lopencv_core \
                                  -lopencv_features2d \
                                  -lopencv_flann \
                                  -lopencv_gpu \
                                  -lopencv_highgui \
                                  -lopencv_imgproc \
                                  -lopencv_legacy \
                                  -lopencv_ml \
                                  -lopencv_nonfree \
                                  -lopencv_objdetect \
                                  -lopencv_ocl \
                                  -lopencv_photo \
                                  -lopencv_stitching \
                                  -lopencv_superres \
                                  -lopencv_video \
                                  -lopencv_videostab
  
  LIBS += -L"/usr/bin/tesseract"
  </code></pre>