Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt and Tesseract Linkage

Qt and Tesseract Linkage

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
install
53 Posts 5 Posters 8.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mchinand
    wrote on 26 May 2022, 17:39 last edited by
    #2

    What errors are you getting? The surrounding parentheses on these lines look odd, especially the ones that don't have a matching open parenthesis. Of the LIB+= lines, you only need the first LIB+= but without the parentheses.

    LIBS += -L"(C:\Program Files(x86)\Tesseract-OCR)" -ltesseract
    
    INCLUDEPATH += C:\Program Files(x86)\Tesseract-OCR)
    LIBS += C:\Program Files(x86)\Tesseract-OCR)
    LIBS +=-LC:\Program Files(x86)\Tesseract-OCR)
    
    1 Reply Last reply
    0
    • O Offline
      O Offline
      OlegD
      wrote on 26 May 2022, 17:58 last edited by
      #3

      @mchinand said in Qt and Tesseract Linkage:

      INCLUDEPATH += C:\Program Files(x86)\Tesseract-OCR)
      LIBS += C:\Program Files(x86)\Tesseract-OCR)
      LIBS +=-LC:\Program Files(x86)\Tesseract-OCR)

      still saying D:\PROG\May\Tesseract\main.cpp:1: error: tesseract/baseapi.h: No such file or directory
      D:\PROG\May\Tesseract\main.cpp:1:10: fatal error: tesseract/baseapi.h: No such file or directory
      1 | #include <tesseract/baseapi.h>
      | ^~~~~~~~~~~~~~~~~~~~~

      current pro file

      QT += core
      QT -= gui

      CONFIG += c++11

      TARGET = openCV
      CONFIG += console
      CONFIG -= app_bundle

      TEMPLATE = app
      INCLUDEPATH += C:\opencv\release\install\include

      LIBS += C:\opencv\release\bin\libopencv_core455.dll
      LIBS += C:\opencv\release\bin\libopencv_highgui455.dll
      LIBS += C:\opencv\release\bin\libopencv_imgcodecs455.dll
      LIBS += C:\opencv\release\bin\libopencv_imgproc455.dll
      LIBS += C:\opencv\release\bin\libopencv_calib3d455.dll
      LIBS += C:\opencv\release\bin\libopencv_features2d455.dll
      LIBS += C:\opencv\release\bin\libopencv_video455.dll
      LIBS += C:\opencv\release\bin\libopencv_videoio455.dll

      INCLUDEPATH += C:\Program Files(x86)\Tesseract-OCR)
      LIBS += C:\Program Files(x86)\Tesseract-OCR)

      LIBS += -LC:\Qt\opencv_cv2\OPENCV1\build-qt\lib
      -lopencv_calib3d249d
      -lopencv_contrib249d
      -lopencv_core249d
      -lopencv_features2d249d
      -lopencv_flann249d
      -lopencv_gpu249d
      -lopencv_highgui249d
      -lopencv_imgproc249d
      -lopencv_legacy249d
      -lopencv_ml249d
      -lopencv_nonfree249d
      -lopencv_objdetect249d
      -lopencv_ocl249d
      -lopencv_photo249d
      -lopencv_stitching249d
      -lopencv_superres249d
      -lopencv_ts249d
      -lopencv_video249d
      -lopencv_videostab249d

      SOURCES += main.cpp

      DEFINES += QT_DEPRECATED_WARNINGS

      please advise!

      J 1 Reply Last reply 14 Jun 2022, 11:58
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 26 May 2022, 18:15 last edited by
        #4

        Hi,

        As @mchinand already suggested, fix your paths.

        Since they have spaces in them you have to quote them properly.

        Also, having a path ending with a ) is unusual, are you sure it's written like that ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • O Offline
          O Offline
          OlegD
          wrote on 26 May 2022, 18:29 last edited by
          #5

          Can you just give me copy paste to make it work, please!
          I've tried to put ' and "", gives error
          Thanks, mister

          J 1 Reply Last reply 26 May 2022, 18:32
          0
          • O OlegD
            26 May 2022, 18:29

            Can you just give me copy paste to make it work, please!
            I've tried to put ' and "", gives error
            Thanks, mister

            J Offline
            J Offline
            JonB
            wrote on 26 May 2022, 18:32 last edited by JonB
            #6

            @OlegD
            Assuming the correct path is C:\Program Files(x86)\Tesseract-OCR, everywhere you use it you need to copy/paste

            "C:\Program Files(x86)\Tesseract-OCR"
            

            My guess is you need

            INCLUDEPATH += "C:\Program Files(x86)\Tesseract-OCR"
            LIBS += -L"C:\Program Files(x86)\Tesseract-OCR"
            
            1 Reply Last reply
            1
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 26 May 2022, 18:38 last edited by
              #7

              Another way to avoid that: install Tesseract in a folder without spaces and special characters.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • M Offline
                M Offline
                mchinand
                wrote on 26 May 2022, 18:59 last edited by
                #8

                @OlegD said in Qt and Tesseract Linkage:

                tesseract/baseapi.h

                You should find where this file is actually located. It could be that your includepath should be INCLUDEPATH += "C:\Program Files(x86)\Tesseract-OCR\include"

                1 Reply Last reply
                1
                • O Offline
                  O Offline
                  OlegD
                  wrote on 26 May 2022, 19:04 last edited by
                  #9

                  edited as per all recommendations of yours..
                  still getting errors:

                  last pro.file output

                  QT += core
                  QT -= gui

                  CONFIG += c++11

                  TARGET = openCV
                  CONFIG += console
                  CONFIG -= app_bundle

                  TEMPLATE = app
                  INCLUDEPATH += C:\opencv\release\install\include

                  LIBS += C:\opencv\release\bin\libopencv_core455.dll
                  LIBS += C:\opencv\release\bin\libopencv_highgui455.dll
                  LIBS += C:\opencv\release\bin\libopencv_imgcodecs455.dll
                  LIBS += C:\opencv\release\bin\libopencv_imgproc455.dll
                  LIBS += C:\opencv\release\bin\libopencv_calib3d455.dll
                  LIBS += C:\opencv\release\bin\libopencv_features2d455.dll
                  LIBS += C:\opencv\release\bin\libopencv_video455.dll
                  LIBS += C:\opencv\release\bin\libopencv_videoio455.dll

                  INCLUDEPATH += "C:\Tesseract-OCR"
                  LIBS += -L"C:\Tesseract-OCR"
                  INCLUDEPATH += "C:\Tesseract-OCR\include"

                  LIBS += -LC:\Qt\opencv_cv2\OPENCV1\build-qt\lib
                  -lopencv_calib3d249d
                  -lopencv_contrib249d
                  -lopencv_core249d
                  -lopencv_features2d249d
                  -lopencv_flann249d
                  -lopencv_gpu249d
                  -lopencv_highgui249d
                  -lopencv_imgproc249d
                  -lopencv_legacy249d
                  -lopencv_ml249d
                  -lopencv_nonfree249d
                  -lopencv_objdetect249d
                  -lopencv_ocl249d
                  -lopencv_photo249d
                  -lopencv_stitching249d
                  -lopencv_superres249d
                  -lopencv_ts249d
                  -lopencv_video249d
                  -lopencv_videostab249d

                  SOURCES += main.cpp

                  DEFINES += QT_DEPRECATED_WARNINGS

                  Feel stupid :D

                  J 1 Reply Last reply 26 May 2022, 19:08
                  0
                  • M Offline
                    M Offline
                    mchinand
                    wrote on 26 May 2022, 19:07 last edited by
                    #10

                    @mchinand said in Qt and Tesseract Linkage:

                    tesseract/baseapi.h

                    Are you getting the same error? What is the full path to this header file on your system?

                    1 Reply Last reply
                    0
                    • O OlegD
                      26 May 2022, 19:04

                      edited as per all recommendations of yours..
                      still getting errors:

                      last pro.file output

                      QT += core
                      QT -= gui

                      CONFIG += c++11

                      TARGET = openCV
                      CONFIG += console
                      CONFIG -= app_bundle

                      TEMPLATE = app
                      INCLUDEPATH += C:\opencv\release\install\include

                      LIBS += C:\opencv\release\bin\libopencv_core455.dll
                      LIBS += C:\opencv\release\bin\libopencv_highgui455.dll
                      LIBS += C:\opencv\release\bin\libopencv_imgcodecs455.dll
                      LIBS += C:\opencv\release\bin\libopencv_imgproc455.dll
                      LIBS += C:\opencv\release\bin\libopencv_calib3d455.dll
                      LIBS += C:\opencv\release\bin\libopencv_features2d455.dll
                      LIBS += C:\opencv\release\bin\libopencv_video455.dll
                      LIBS += C:\opencv\release\bin\libopencv_videoio455.dll

                      INCLUDEPATH += "C:\Tesseract-OCR"
                      LIBS += -L"C:\Tesseract-OCR"
                      INCLUDEPATH += "C:\Tesseract-OCR\include"

                      LIBS += -LC:\Qt\opencv_cv2\OPENCV1\build-qt\lib
                      -lopencv_calib3d249d
                      -lopencv_contrib249d
                      -lopencv_core249d
                      -lopencv_features2d249d
                      -lopencv_flann249d
                      -lopencv_gpu249d
                      -lopencv_highgui249d
                      -lopencv_imgproc249d
                      -lopencv_legacy249d
                      -lopencv_ml249d
                      -lopencv_nonfree249d
                      -lopencv_objdetect249d
                      -lopencv_ocl249d
                      -lopencv_photo249d
                      -lopencv_stitching249d
                      -lopencv_superres249d
                      -lopencv_ts249d
                      -lopencv_video249d
                      -lopencv_videostab249d

                      SOURCES += main.cpp

                      DEFINES += QT_DEPRECATED_WARNINGS

                      Feel stupid :D

                      J Offline
                      J Offline
                      JonB
                      wrote on 26 May 2022, 19:08 last edited by JonB
                      #11

                      @OlegD said in Qt and Tesseract Linkage:

                      still getting errors:

                      Wouldn't you want to say/confirm what these errors are??

                      If it's failing on #include <tesseract/baseapi.h>, where exactly is that file? Is it at C:\Tesseract-OCR\include\tesseract\baseapi.h?

                      1 Reply Last reply
                      1
                      • O Offline
                        O Offline
                        OlegD
                        wrote on 27 May 2022, 08:03 last edited by
                        #12

                        tesseract_ver.png
                        Is there any chance I've installed wrong tesseract version?

                        Downloaded in installed version from the link below
                        https://tesseract-ocr.github.io/tessdoc/Home.html

                        @OlegD said in Qt and Tesseract Linkage:

                        edited as per all recommendations of yours..
                        still getting errors:

                        last pro.file output

                        QT += core
                        QT -= gui

                        CONFIG += c++11

                        TARGET = openCV
                        CONFIG += console
                        CONFIG -= app_bundle

                        TEMPLATE = app
                        INCLUDEPATH += C:\opencv\release\install\include

                        LIBS += C:\opencv\release\bin\libopencv_core455.dll
                        LIBS += C:\opencv\release\bin\libopencv_highgui455.dll
                        LIBS += C:\opencv\release\bin\libopencv_imgcodecs455.dll
                        LIBS += C:\opencv\release\bin\libopencv_imgproc455.dll
                        LIBS += C:\opencv\release\bin\libopencv_calib3d455.dll
                        LIBS += C:\opencv\release\bin\libopencv_features2d455.dll
                        LIBS += C:\opencv\release\bin\libopencv_video455.dll
                        LIBS += C:\opencv\release\bin\libopencv_videoio455.dll

                        INCLUDEPATH += "C:\Tesseract-OCR"
                        LIBS += -L"C:\Tesseract-OCR"
                        INCLUDEPATH += "C:\Tesseract-OCR\include"

                        LIBS += -LC:\Qt\opencv_cv2\OPENCV1\build-qt\lib
                        -lopencv_calib3d249d
                        -lopencv_contrib249d
                        -lopencv_core249d
                        -lopencv_features2d249d
                        -lopencv_flann249d
                        -lopencv_gpu249d
                        -lopencv_highgui249d
                        -lopencv_imgproc249d
                        -lopencv_legacy249d
                        -lopencv_ml249d
                        -lopencv_nonfree249d
                        -lopencv_objdetect249d
                        -lopencv_ocl249d
                        -lopencv_photo249d
                        -lopencv_stitching249d
                        -lopencv_superres249d
                        -lopencv_ts249d
                        -lopencv_video249d
                        -lopencv_videostab249d

                        SOURCES += main.cpp

                        DEFINES += QT_DEPRECATED_WARNINGS

                        Feel stupid :D

                        Is there any chance I've installed wrong tesseract version?

                        Downloaded in installed version from the link below
                        https://tesseract-ocr.github.io/tessdoc/Home.html

                        J 1 Reply Last reply 27 May 2022, 08:24
                        0
                        • O OlegD
                          27 May 2022, 08:03

                          tesseract_ver.png
                          Is there any chance I've installed wrong tesseract version?

                          Downloaded in installed version from the link below
                          https://tesseract-ocr.github.io/tessdoc/Home.html

                          @OlegD said in Qt and Tesseract Linkage:

                          edited as per all recommendations of yours..
                          still getting errors:

                          last pro.file output

                          QT += core
                          QT -= gui

                          CONFIG += c++11

                          TARGET = openCV
                          CONFIG += console
                          CONFIG -= app_bundle

                          TEMPLATE = app
                          INCLUDEPATH += C:\opencv\release\install\include

                          LIBS += C:\opencv\release\bin\libopencv_core455.dll
                          LIBS += C:\opencv\release\bin\libopencv_highgui455.dll
                          LIBS += C:\opencv\release\bin\libopencv_imgcodecs455.dll
                          LIBS += C:\opencv\release\bin\libopencv_imgproc455.dll
                          LIBS += C:\opencv\release\bin\libopencv_calib3d455.dll
                          LIBS += C:\opencv\release\bin\libopencv_features2d455.dll
                          LIBS += C:\opencv\release\bin\libopencv_video455.dll
                          LIBS += C:\opencv\release\bin\libopencv_videoio455.dll

                          INCLUDEPATH += "C:\Tesseract-OCR"
                          LIBS += -L"C:\Tesseract-OCR"
                          INCLUDEPATH += "C:\Tesseract-OCR\include"

                          LIBS += -LC:\Qt\opencv_cv2\OPENCV1\build-qt\lib
                          -lopencv_calib3d249d
                          -lopencv_contrib249d
                          -lopencv_core249d
                          -lopencv_features2d249d
                          -lopencv_flann249d
                          -lopencv_gpu249d
                          -lopencv_highgui249d
                          -lopencv_imgproc249d
                          -lopencv_legacy249d
                          -lopencv_ml249d
                          -lopencv_nonfree249d
                          -lopencv_objdetect249d
                          -lopencv_ocl249d
                          -lopencv_photo249d
                          -lopencv_stitching249d
                          -lopencv_superres249d
                          -lopencv_ts249d
                          -lopencv_video249d
                          -lopencv_videostab249d

                          SOURCES += main.cpp

                          DEFINES += QT_DEPRECATED_WARNINGS

                          Feel stupid :D

                          Is there any chance I've installed wrong tesseract version?

                          Downloaded in installed version from the link below
                          https://tesseract-ocr.github.io/tessdoc/Home.html

                          J Offline
                          J Offline
                          JonB
                          wrote on 27 May 2022, 08:24 last edited by
                          #13

                          @OlegD said in Qt and Tesseract Linkage:

                          Is there any chance I've installed wrong tesseract version?

                          That's for you to sort out. But there are no .h files, and no include sub-directory.

                          1 Reply Last reply
                          0
                          • O Offline
                            O Offline
                            OlegD
                            wrote on 27 May 2022, 08:31 last edited by
                            #14

                            so what should i actually do ?
                            I'm totally lost now :D

                            J 1 Reply Last reply 27 May 2022, 08:32
                            0
                            • J.HilkJ Offline
                              J.HilkJ Offline
                              J.Hilk
                              Moderators
                              wrote on 27 May 2022, 08:31 last edited by
                              #15

                              @OlegD said in Qt and Tesseract Linkage:

                              LIBS += -LC:\Qt\opencv_cv2\OPENCV1\build-qt\lib
                              -lopencv_calib3d249d
                              -lopencv_contrib249d
                              -lopencv_core249d
                              -lopencv_features2d249d
                              -lopencv_flann249d
                              -lopencv_gpu249d
                              -lopencv_highgui249d
                              -lopencv_imgproc249d
                              -lopencv_legacy249d
                              -lopencv_ml249d
                              -lopencv_nonfree249d
                              -lopencv_objdetect249d
                              -lopencv_ocl249d
                              -lopencv_photo249d
                              -lopencv_stitching249d
                              -lopencv_superres249d
                              -lopencv_ts249d
                              -lopencv_video249d
                              -lopencv_videostab249d

                              this is incorrect

                              those need to be inline or concatenated via \ to escape the (invisible) newline character


                              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                              Q: What's that?
                              A: It's blue light.
                              Q: What does it do?
                              A: It turns blue.

                              1 Reply Last reply
                              0
                              • O OlegD
                                27 May 2022, 08:31

                                so what should i actually do ?
                                I'm totally lost now :D

                                J Offline
                                J Offline
                                JonB
                                wrote on 27 May 2022, 08:32 last edited by
                                #16

                                @OlegD said in Qt and Tesseract Linkage:

                                so what should i actually do ?
                                I'm totally lost now :D

                                Did you read & follow the instructions (for Windows) from the link?

                                1 Reply Last reply
                                0
                                • O Offline
                                  O Offline
                                  OlegD
                                  wrote on 27 May 2022, 09:20 last edited by
                                  #17

                                  Well, I dont know how to make it work with QT.
                                  I've just installed package, realized that there is no instruction for QT and posted to QT forum.
                                  Please advise how can I install it properly for QT environment

                                  Windows
                                  main branch, 3.05 and later
                                  Using Tesseract

                                  !!! IMPORTANT !!! To use Tesseract in your application (to include tess or to link it into your app) see this very simple example.
                                  Build the latest library (using Software Network client)

                                  Download the latest SW (Software Network https://software-network.org/) client from https://software-network.org/client/.
                                  Run sw setup (may require administrator access)
                                  Run sw build org.sw.demo.google.tesseract.tesseract-master.
                                  

                                  For visual studio project using tesseract

                                  Setup Vcpkg the Visual C++ Package Manager.
                                  Run vcpkg install tesseract:x64-windows for 64-bit. Use –head for the master branch.
                                  

                                  Static linking

                                  To build a self-contained tesseract.exe executable (without any DLLs or runtime dependencies), use Vcpkg as above with the following command:

                                  vcpkg install tesseract:x64-windows-static for 64-bit
                                  vcpkg install tesseract:x86-windows-static for 32-bit
                                  

                                  Use –head for the main branch. It may still require one DLL for the OpenMP runtime, vcomp140.dll (which you can find in the Visual C++ Redistributable 2015).
                                  Build training tools

                                  Today it is possible to build a full set of tess training tools on Windows with Visual Studio. You need to have the latest VS compiler (VS2019/2022 or light VS 2019/2022 build tools distro installed.

                                  To do this:

                                  Download the latest SW (Software Network https://software-network.org/client/) client from https://software-network.org/client/.
                                  Checkout tesseract sources git clone https://github.com/tesseract-ocr/tesseract tesseract && cd tesseract.
                                  Run sw build.
                                  Binaries will be available under .sw\out\some hash dir...
                                  

                                  Develop Tesseract

                                  For development purposes of Tesseract itself do the next steps:

                                  Download and install Git, CMake and put them in PATH.
                                  Download the latest SW (Software Network https://software-network.org/) client from https://software-network.org/client/. SW is a source package distribution system.
                                  Add SW client to PATH.
                                  Run sw setup (may require administrator access)
                                  If you have a release archive, unpack it to tesseract dir.
                                  

                                  If you’re using main branch run

                                  git clone https://github.com/tesseract-ocr/tesseract tesseract

                                  Run
                                  
                                   cd tesseract
                                   mkdir build && cd build
                                   cmake ..
                                  
                                  Build a solution (tesseract.sln) in your Visual Studio version. If you want to build and install from command line (e.g. Release build) you can use this command:
                                  
                                  cmake --build . --config Release --target install
                                  
                                  If you want to install to other directory that C:\Program Files (you will need admin right for this), you need to specify install path during configuration:
                                  
                                  cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=inst
                                  

                                  For development purposes of training tools after cloning a repo from previous paragraph, run

                                  sw build

                                  You’ll see a solution link appeared in the root directory of Tesseract.
                                  Building for x64 platform
                                  sw

                                  If you’re building with sw+cmake, run cmake as follows:

                                  mkdir win64 && cd win64
                                  cmake .. -G "Visual Studio 14 2015 Win64"

                                  If you’re building with sw run sw generate, it will create a solution link for you (not yet implemented!).

                                  J 1 Reply Last reply 27 May 2022, 10:14
                                  0
                                  • O OlegD
                                    27 May 2022, 09:20

                                    Well, I dont know how to make it work with QT.
                                    I've just installed package, realized that there is no instruction for QT and posted to QT forum.
                                    Please advise how can I install it properly for QT environment

                                    Windows
                                    main branch, 3.05 and later
                                    Using Tesseract

                                    !!! IMPORTANT !!! To use Tesseract in your application (to include tess or to link it into your app) see this very simple example.
                                    Build the latest library (using Software Network client)

                                    Download the latest SW (Software Network https://software-network.org/) client from https://software-network.org/client/.
                                    Run sw setup (may require administrator access)
                                    Run sw build org.sw.demo.google.tesseract.tesseract-master.
                                    

                                    For visual studio project using tesseract

                                    Setup Vcpkg the Visual C++ Package Manager.
                                    Run vcpkg install tesseract:x64-windows for 64-bit. Use –head for the master branch.
                                    

                                    Static linking

                                    To build a self-contained tesseract.exe executable (without any DLLs or runtime dependencies), use Vcpkg as above with the following command:

                                    vcpkg install tesseract:x64-windows-static for 64-bit
                                    vcpkg install tesseract:x86-windows-static for 32-bit
                                    

                                    Use –head for the main branch. It may still require one DLL for the OpenMP runtime, vcomp140.dll (which you can find in the Visual C++ Redistributable 2015).
                                    Build training tools

                                    Today it is possible to build a full set of tess training tools on Windows with Visual Studio. You need to have the latest VS compiler (VS2019/2022 or light VS 2019/2022 build tools distro installed.

                                    To do this:

                                    Download the latest SW (Software Network https://software-network.org/client/) client from https://software-network.org/client/.
                                    Checkout tesseract sources git clone https://github.com/tesseract-ocr/tesseract tesseract && cd tesseract.
                                    Run sw build.
                                    Binaries will be available under .sw\out\some hash dir...
                                    

                                    Develop Tesseract

                                    For development purposes of Tesseract itself do the next steps:

                                    Download and install Git, CMake and put them in PATH.
                                    Download the latest SW (Software Network https://software-network.org/) client from https://software-network.org/client/. SW is a source package distribution system.
                                    Add SW client to PATH.
                                    Run sw setup (may require administrator access)
                                    If you have a release archive, unpack it to tesseract dir.
                                    

                                    If you’re using main branch run

                                    git clone https://github.com/tesseract-ocr/tesseract tesseract

                                    Run
                                    
                                     cd tesseract
                                     mkdir build && cd build
                                     cmake ..
                                    
                                    Build a solution (tesseract.sln) in your Visual Studio version. If you want to build and install from command line (e.g. Release build) you can use this command:
                                    
                                    cmake --build . --config Release --target install
                                    
                                    If you want to install to other directory that C:\Program Files (you will need admin right for this), you need to specify install path during configuration:
                                    
                                    cmake .. -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=inst
                                    

                                    For development purposes of training tools after cloning a repo from previous paragraph, run

                                    sw build

                                    You’ll see a solution link appeared in the root directory of Tesseract.
                                    Building for x64 platform
                                    sw

                                    If you’re building with sw+cmake, run cmake as follows:

                                    mkdir win64 && cd win64
                                    cmake .. -G "Visual Studio 14 2015 Win64"

                                    If you’re building with sw run sw generate, it will create a solution link for you (not yet implemented!).

                                    J Offline
                                    J Offline
                                    JonB
                                    wrote on 27 May 2022, 10:14 last edited by JonB
                                    #18

                                    @OlegD
                                    All you have done is pasted the whole of the instructions. They are for you to read and act on. Only you know what you did/did not do.

                                    Well, I dont know how to make it work with QT.
                                    I've just installed package, realized that there is no instruction for QT and posted to QT forum.
                                    Please advise how can I install it properly for QT environment

                                    I do not see anything related to Qt, or for Qt instructions.
                                    Your code has #include <tesseract/baseapi.h>.
                                    I pointed out that from what you show there are no .h files anywhere (that I can see).
                                    I suggested you need to see if that file is anywhere, or sort out whatever you need to do to get it available. Assuming you need that line.
                                    I don't use "tesseract", and I don't suppose anybody else here does either.

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      mchinand
                                      wrote on 27 May 2022, 12:43 last edited by
                                      #19

                                      It looks like what you downloaded was just the pre-built binary and associated files to use the tesseract application and not to develop your own. You will have to build the library yourself; just follow the directions that you posted above closely step by step.

                                      J 1 Reply Last reply 27 May 2022, 12:55
                                      0
                                      • M mchinand
                                        27 May 2022, 12:43

                                        It looks like what you downloaded was just the pre-built binary and associated files to use the tesseract application and not to develop your own. You will have to build the library yourself; just follow the directions that you posted above closely step by step.

                                        J Offline
                                        J Offline
                                        JonB
                                        wrote on 27 May 2022, 12:55 last edited by
                                        #20

                                        @mchinand
                                        So it was just a sample application? And they do not provide the .h files with it?

                                        Does he really need to build it? IF it comes with pre-compiled external DLLs of whatever to make the (sample?) app work, can't he use those plus .libs & .hs for his own code without having to build the .dlls?

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          mchinand
                                          wrote on 27 May 2022, 13:06 last edited by
                                          #21

                                          It might be possible but probably easier to just build it. I'm not seeing a .lib only a 'tesseract-5.dll'. I would characterize it as an application that non-developers use and not just a sample application (like you though, I've never used it).

                                          1 Reply Last reply
                                          1

                                          11/53

                                          26 May 2022, 19:08

                                          topic:navigator.unread, 42
                                          • Login

                                          • Login or register to search.
                                          11 out of 53
                                          • First post
                                            11/53
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved