letterassist-ai / flusseract

Flutter plugin for Tesseract OCR library.
MIT License
2 stars 1 forks source link

Problems finding the Leptonica and Tesseract libraries on Windows #3

Open DarlyMR opened 2 months ago

DarlyMR commented 2 months ago

I don't know if I'm avoiding any steps in the implementation of this library, but from what I see it is impossible to find the external libraries with these paths in Windows, although I understand a little about why it has not been specified since these do not have an installation address per Defect and their official guides do not do so either.

flutter lib

After having manually specified where the libraries are, I receive several errors that are slightly different from each other but match the same error number "MSB8066":

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\3d4ec93bda42669b76abb726c38c1ec0\ext_libzstd-iphonesimulator-x86_64-mkdir.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\3d4ec93bda42669b76abb726c38c1ec0\ext_libzstd-iphonesimulator-x86_64-download.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\3d4ec93bda42669b76abb726c38c1ec0\ext_libzstd-iphonesimulator-x86_64-update.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\3d4ec93bda42669b76abb726c38c1ec0\ext_libzstd-iphonesimulator-x86_64-patch.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\3d4ec93bda42669b76abb726c38c1ec0\ext_libzstd-iphonesimulator-x86_64-configure.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\3d4ec93bda42669b76abb726c38c1ec0\ext_libzstd-iphonesimulator-x86_64-build.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\3d4ec93bda42669b76abb726c38c1ec0\ext_libzstd-iphonesimulator-x86_64-install.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\5519318d8e60f699bdae9eb4a6cf4d02\ext_libzstd-iphonesimulator-x86_64-complete.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7192d700ee16c28fe6077b517779c173\ext_libzstd-iphonesimulator-x86_64.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\windows\flutter\ephemeral.plugin_symlinks\flusseract\src\libzstd\CMakeLists.txt' exited with code 3. [C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\plugins\flusseract\shared\libzstd\ext_libzstd-iphonesimulator-x86_64.vcxproj]

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7c41241cbd8ede41aa7b11cb2e06a4ac\ext_libzstd-macosx-arm64-mkdir.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7c41241cbd8ede41aa7b11cb2e06a4ac\ext_libzstd-macosx-arm64-download.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7c41241cbd8ede41aa7b11cb2e06a4ac\ext_libzstd-macosx-arm64-update.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7c41241cbd8ede41aa7b11cb2e06a4ac\ext_libzstd-macosx-arm64-patch.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7c41241cbd8ede41aa7b11cb2e06a4ac\ext_libzstd-macosx-arm64-configure.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7c41241cbd8ede41aa7b11cb2e06a4ac\ext_libzstd-macosx-arm64-build.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7c41241cbd8ede41aa7b11cb2e06a4ac\ext_libzstd-macosx-arm64-install.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\5519318d8e60f699bdae9eb4a6cf4d02\ext_libzstd-macosx-arm64-complete.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\CMakeFiles\7192d700ee16c28fe6077b517779c173\ext_libzstd-macosx-arm64.rule;C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\windows\flutter\ephemeral.plugin_symlinks\flusseract\src\libzstd\CMakeLists.txt' exited with code 3. [C:\Users\xxxx\Documents\Programacion\Flutter\auto_hunt_with_code_detector\build\windows\x64\plugins\flusseract\shared\libzstd\ext_libzstd-macosx-arm64.vcxproj]

mevansam commented 2 months ago

I haven't built and tested the plugin and example app in Windows and Linux. This work is planned for the next couple of weeks. I will leave an update when a new plugin that has been built and tested on Windows and Linux has been published.

FarisSpahic commented 2 months ago

Hello, enjoying the plugin so far :) I've managed to integrate the dynamic lib into android app, but the similar issue happens like for the gentleman that authored the issue. ` user@192 example % flutter build ios Building com.company.aiflusseract for device (ios-release)... Automatically signing iOS for device deployment using specified development team in Xcode project: X76XXTPX5X Running pod install... 3.1s Running Xcode build...
Xcode build done. 20.8s Failed to build iOS app Error (Xcode): linker command failed with exit code 1 (use -v to see invocation) /Users/user/Documents/GitHub/flusseract/example/ios/Pods/%20%20%20%20clang:0:0

Uncategorized (Xcode): Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure

Lexical or Preprocessor Issue (Xcode): 'leptonica/allheaders.h' file not found /Users/user/Documents/GitHub/flusseract/src/flusseract.cpp:4:9

Encountered error while building for device. `

To put it in short terms: Tried running the example app(changed only the apple dev account team reference) and this error occurs. Tried cleaning the .lock file and Pods directory, no luck there... Flutter doctor is all green-marked. Running flutter 3.19.6 and dart 3.3.4. Noticed in changelog that you tested on iOS simulator, but not on the real device?