Closed kzorin52 closed 1 year ago
Please run the code with logging so that it tells you where it is looking for the DLL.
Please run the code with logging so that it tells you where it is looking for the DLL.
2023-10-24T15:39:28.745 - Trying to load native function 'boxaGetBox' from the library with handle '140736763592704' 2023-10-24T15:39:28.746 - Successfully loaded native function 'boxaGetBox' with handle '140736763804848' 2023-10-24T15:39:28.746 - Trying to load native function 'boxGetGeometry' from the library with handle '140736763592704'2023-10-24T15:39:28.747 - Successfully loaded native function 'boxGetGeometry' with handle '140736763801776' 2023-10-24T15:39:28.747 - Trying to load native function 'boxDestroy' from the library with handle '140736763592704' 2023-10-24T15:39:28.747 - Successfully loaded native function 'boxDestroy' with handle '140736763801680' 2023-10-24T15:39:28.747 - Trying to load native function 'boxaDestroy' from the library with handle '140736763592704' 2023-10-24T15:39:28.748 - Successfully loaded native function 'boxaDestroy' with handle '140736763803328' 2023-10-24T15:39:28.748 - Trying to load native function 'pixBlend' from the library with handle '140736763592704' 2023-10-24T15:39:28.748 - Successfully loaded native function 'pixBlend' with handle '140736763770000' 2023-10-24T15:39:28.763 - Current platform is x64 2023-10-24T15:39:28.763 - Code base was empty 2023-10-24T15:39:28.764 - Executing assembly location was empty 2023-10-24T15:39:28.765 - Trying to load file from 'F:\repos\PrivateParser\bin\x64\Release\net8.0-windows\x64\tesseract53.dll' 2023-10-24T15:39:28.766 - Trying to load native library 'F:\repos\PrivateParser\bin\x64\Release\net8.0-windows\x64\tesseract53.dll' 2023-10-24T15:39:28.768 - Failed to load native library 'F:\repos\PrivateParser\bin\x64\Release\net8.0-windows\x64\tesseract53.dll', set logging to debug level and check logging 2023-10-24T15:39:28.768 - Trying to load file from 'F:\repos\PrivateParser\bin\x64\Release\net8.0-windows\x64\tesseract53.dll' 2023-10-24T15:39:28.769 - Trying to load native library 'F:\repos\PrivateParser\bin\x64\Release\net8.0-windows\x64\tesseract53.dll' 2023-10-24T15:39:28.770 - Failed to load native library 'F:\repos\PrivateParser\bin\x64\Release\net8.0-windows\x64\tesseract53.dll', set logging to debug level and check logging 2023-10-24T15:39:28.771 - Custom search path is not defined, skipping. 2023-10-24T15:39:28.771 - Failed to find library 'tesseract53.dll' for platform x64
It finds the file but can not load it so either you did compile it as x64 and try to load it as 32 bits (or the other way around) or something is just wrong with the DLL.
So do what it asks --> set logging to debug level and check logging
It finds the file but can not load it so either you did compile it as x64 and try to load it as 32 bits (or the other way around) or something is just wrong with the DLL.
So do what it asks --> set logging to debug level and check logging
How to set debug level? I already tried x86, same result So i compiled x64 tesseract
I checked up, there is already debug level:
Writes log information to console at the <see cref="LogLevel.Debug"/>, <see cref="LogLevel.Error"/>
and <see cref="LogLevel.Information"/> <see cref="LogLevel"/>
Engine Engine = new(".", "eng", EngineMode.LstmOnly, logger: new TesseractOCR.Loggers.Console())
Full log from debug logs: https://pastebin.com/FEm5sbrg
According to the logging something is wrong with the DLL you compiled. According to the logging it is in --> F:\repos\PrivateParser\bin\Release\net8.0-windows\x64\tesseract53.dll but it could not be loaded so I guess you did something wrong when compiling the DLL. It is hard for me to just guess what is wrong.
Okay, ill recompile full stock, w/o any patches
How do i build on macos M2 chips? I get this error when using the script out of the wiki:
error: in triplet x64-windows-static: Use of Visual Studio's Developer Prompt is unsupported on non-Windows hosts.
Define 'VCPKG_CMAKE_SYSTEM_NAME' or 'VCPKG_CHAINLOAD_TOOLCHAIN_FILE' in the triplet file.
My logs are:
2024-03-24T01:38:07.241 - Current OS is MacOSX
2024-03-24T01:38:07.287 - Current platform is x64
2024-03-24T01:38:07.287 - Trying to load file from 'Users/halilibrahimozcan/source/projects/Ocr/Ocr/bin/Debug/net8.0/x64/libleptonica-1.83.1.dll.dylib'
2024-03-24T01:38:07.287 - Trying to load file from '/Users/halilibrahimozcan/source/projects/Ocr/Ocr/bin/Debug/net8.0/x64/libleptonica-1.83.1.dll.dylib'
2024-03-24T01:38:07.287 - Trying to load file from '/Users/halilibrahimozcan/source/projects/Ocr/Ocr/bin/Debug/net8.0/x64/libleptonica-1.83.1.dll.dylib'
2024-03-24T01:38:07.287 - Trying to load file from '/Users/halilibrahimozcan/source/projects/Ocr/Ocr/bin/Debug/net8.0/x64/libleptonica-1.83.1.dll.dylib'
2024-03-24T01:38:07.288 - Custom search path is not defined, skipping.
2024-03-24T01:38:07.288 - Failed to find library 'libleptonica-1.83.1.dll.dylib' for platform x64
I decided to build tesseract by myself, patched w/o logging:
so i just copy result x64 dll to
x64
folder in binaries (replaced original) and gets this error: