I passed first part of installation guide: Build the latest library (using Software Network client) 1. Download <https://software-network.org/client/sw-master-windows-client.zip> the latest SW (Software Network https://software-network.org/) client from https://software-network.org/client/. 2. Run sw setup (may require administrator access) 3. Run sw build org.sw.demo.google.tesseract.tesseract-master.
Now Im stuck here Mingw-w64 Mingw-w64 <http://mingw-w64.org/> allows building 32- or 64-bit executables for Windows. It can be used for native compilations on Windows, but also for cross compilations on Linux (which are easier and faster than native compilations). Most large Linux distributions already contain packages with the tools need for a cross build. Before building Tesseract, it is necessary to build some prerequisites. For Debian and similar distributions (e. g. Ubuntu), the cross tools can be installed like that: # Development environment targeting 32- and 64-bit Windows (required) apt-get install mingw-w64 # Development tools for 32- and 64-bit Windows (optional) apt-get install mingw-w64-tools These prerequisites will be needed: - libpng, libtiff, zlib (binaries for Mingw-w64 available as part of the GTK+ bundles) - libicu <https://github.com/svn2github/icu4c> - liblcms2 <https://github.com/mm2/Little-CMS> - openjpeg <https://github.com/uclouvain/openjpeg> - leptonica <https://github.com/DanBloomberg/leptonica/> Tried to execute commands from shell and from QT Mingw commandline. Failed 'apt-get' is not recognized as an internal or external command, operable program or batch file. C:\Qt\6.2.3\mingw_64>bin What should I do next? вторник, 14 июня 2022 г. в 17:37:56 UTC+7, fishmo...@gmail.com: > I have everything ready with current setup mingw-QT (QtCreator)-OpenCV > > Can you please message me on Whatsap +79672508779 > I really need your help! My project on hold for looooong time, and I'm too > dumb to install it myself ) > > > вторник, 14 июня 2022 г. в 01:29:35 UTC+7, zdenop: > >> Do you really need mingw or can you use/switch to MSVC (which would make >> sense if you would like to use opencv)? >> >> (IMO) In the case of MSVC you can download and you can try to use the >> artifact from Github Action "cmake-win64" >> e.g. https://github.com/tesseract-ocr/tesseract/actions/runs/2485126735 >> (an artifact is available for 5 days, but GA is run each night)... >> >> Zdenko >> >> >> po 13. 6. 2022 o 20:22 Дмитрий Кочкин <yky...@gmail.com> napísal(a): >> >>> Can you please help to install! >>> I could pay for your work >>> >>> четверг, 2 июня 2022 г. в 00:57:58 UTC+7, zdenop: >>> >>>> You need to build tesseract and leptonica by yourself (+ needed >>>> dependencies) with MinGW. If I got it right - you have installed just >>>> runtime libraries, but for creating your app you need libraries useable >>>> for >>>> linking (and header files). >>>> >>>> I am afraid the same you will need to do with OpenCV, as OpenCV just >>>> provides VS library which is not usable with MinGW[2],[1] >>>> I really doubt this is worthy of time - it is better is to switch to >>>> Visual Studio on Windows (and you still can use Qt Creator) >>>> >>>> [1] >>>> https://medium.com/csmadeeasy/opencv-c-installation-on-windows-with-mingw-c0fc1499f39 >>>> [2] https://github.com/opencv/opencv/releases >>>> >>>> Zdenko >>>> >>>> >>>> ut 31. 5. 2022 o 18:37 Fish Money <fishmo...@gmail.com> napísal(a): >>>> >>>>> I'm usuing mingw + openCV in my current project. >>>>> It has been built for work in QT IDE... >>>>> >>>>> I just need to use OCR into my project and yet, could not find any >>>>> instruction on internet. >>>>> I actually need to run the code below from QT... >>>>> >>>>> >>>>> What are my next steps to make this happen? >>>>> #include <tesseract/baseapi.h> >>>>> #include <leptonica/allheaders.h> >>>>> using namespace std; >>>>> >>>>> int main() >>>>> { >>>>> char *outText; >>>>> >>>>> tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI(); >>>>> // Initialize tesseract-ocr with English, without specifying >>>>> tessdata path >>>>> if (api->Init(NULL, "eng")) { >>>>> fprintf(stderr, "Could not initialize tesseract.\n"); >>>>> exit(1); >>>>> } >>>>> >>>>> // Open input image with leptonica library >>>>> Pix *image = pixRead("/usr/src/tesseract/testing/phototest.tif"); >>>>> api->SetImage(image); >>>>> // Get OCR result >>>>> outText = api->GetUTF8Text(); >>>>> cout << ("OCR output:\n%s", outText); >>>>> >>>>> // Destroy used object and release memory >>>>> api->End(); >>>>> delete api; >>>>> delete [] outText; >>>>> pixDestroy(&image); >>>>> >>>>> return 0; >>>>> } >>>>> вторник, 31 мая 2022 г. в 22:36:55 UTC+7, zdenop: >>>>> >>>>>> I am not sure why you mentioned SW, as your screenshot indicates you >>>>>> have installed gcc (mingw?) runtime libs: >>>>>> >>>>>> [image: image.png] >>>>>> >>>>>> Do you plan to build your project with mingw? Is opencv built with >>>>>> mingw too? You can not mix VS libraries with mingw libraries... >>>>>> Also another part of your project file looks suspicious: >>>>>> "LIBS += C:\opencv\release\bin\libopencv_core455.dll" >>>>>> Do you know what are you there? Maybe you should start with a >>>>>> simple project to understand how to use external libraries... >>>>>> >>>>>> >>>>>> >>>>>> Zdenko >>>>>> >>>>>> >>>>>> ut 31. 5. 2022 o 17:00 Fish Money <fishmo...@gmail.com> napísal(a): >>>>>> >>>>>>> I actually stuck, because I could not execute SW and SW_GUI files. >>>>>>> My tesseract folder contains in screen shot attached. >>>>>>> >>>>>>> Dear Zdenko, >>>>>>> Is there any chance we can talk via WhatsApp? >>>>>>> Stuck so bad here in my project... >>>>>>> You gonna save my life :D >>>>>>> >>>>>>> вторник, 31 мая 2022 г. в 13:56:32 UTC+7, zdenop: >>>>>>> >>>>>>>> INCLUDEPATH += /usr/include/tesseract >>>>>>>> >>>>>>>> This does not seem correct on windows. >>>>>>>> >>>>>>>> error: tesseract/baseapi.h: No such file or directory >>>>>>>> >>>>>>>> So you have installed tesseract header files? >>>>>>>> >>>>>>>> You did not mention which compiler you used: "*.dll" indicates >>>>>>>> Visual studio, but what is in "C:\Program Files(x86)\Tesseract-OCR"? >>>>>>>> >>>>>>>> Zdenko >>>>>>>> >>>>>>>> >>>>>>>> po 30. 5. 2022 o 11:19 Fish Money <fishmo...@gmail.com> napísal(a): >>>>>>>> >>>>>>>>> Hello! How can i amend the pro file to make the program work? >>>>>>>>> >>>>>>>>> Googled a lot about QT and Tesseract, could not find a solution >>>>>>>>> yet. >>>>>>>>> >>>>>>>>> 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 >>>>>>>>> LIBS += -L"(C:\Program Files(x86)\Tesseract-OCR)" -ltesseract >>>>>>>>> >>>>>>>>> INCLUDEPATH += /usr/include/tesseract >>>>>>>>> >>>>>>>>> INCLUDEPATH += C:\Program Files(x86)\Tesseract-OCR) >>>>>>>>> >>>>>>>>> LIBS += C:\Program Files(x86)\Tesseract-OCR) >>>>>>>>> >>>>>>>>> LIBS +=-LC:\Program Files(x86)\Tesseract-OCR) >>>>>>>>> -ltesseract.dll >>>>>>>>> -llept.dll >>>>>>>>> >>>>>>>>> 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 >>>>>>>>> >>>>>>>>> Errors: >>>>>>>>> >>>>>>>>> >>>>>>>>> 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> >>>>>>>>> | ^~~~~~~~~~~~~~~~~~~~~ >>>>>>>>> >>>>>>>>> >>>>>>>>> Might be incorrect install, because SW file and SW gui could not >>>>>>>>> be executed. >>>>>>>>> >>>>>>>>> Strongly need advice! >>>>>>>>> >>>>>>>>> -- >>>>>>>>> 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. >>>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/tesseract-ocr/923f5b9b-def7-4171-9ac6-d342a3a99dc9n%40googlegroups.com >>>>>>>>> >>>>>>>>> <https://groups.google.com/d/msgid/tesseract-ocr/923f5b9b-def7-4171-9ac6-d342a3a99dc9n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>>> . >>>>>>>>> >>>>>>>> -- >>>>>>> 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. >>>>>>> >>>>>> To view this discussion on the web visit >>>>>>> https://groups.google.com/d/msgid/tesseract-ocr/71657717-96de-4d45-8e8c-68b9470b24f4n%40googlegroups.com >>>>>>> >>>>>>> <https://groups.google.com/d/msgid/tesseract-ocr/71657717-96de-4d45-8e8c-68b9470b24f4n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>> -- >>>>> 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. >>>>> >>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/tesseract-ocr/eb46e820-7667-4ff3-88bf-d9aecac1de20n%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/tesseract-ocr/eb46e820-7667-4ff3-88bf-d9aecac1de20n%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> 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. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/tesseract-ocr/b238ceb7-a36a-4ba4-8923-bf74f44e2c8an%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/tesseract-ocr/b238ceb7-a36a-4ba4-8923-bf74f44e2c8an%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- 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-ocr+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/11d481ec-cb95-4c79-978f-d05018725d03n%40googlegroups.com.