letterassist-ai / flusseract

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

when i build the example on macos, i got this error,i use the m1 mac。but ‘flutter run’ is work。 #6

Open kickerz31 opened 3 weeks ago

kickerz31 commented 3 weeks ago

$ flutter build macos
Changing current working directory to: /Users/liushufang/Documents/flusseract/example

--- xcodebuild: WARNING: Using the first of multiple matching destinations: { platform:macOS, arch:arm64, id:00006000-001421AA2602401E } { platform:macOS, arch:x86_64, id:00006000-001421AA2602401E } ld: warning: directory not found for option '-L/Users/liushufang/Documents/flusseract/example/macos/Pods/flusseract/lib' ld: warning: directory not found for option '-L/Users/liushufang/Documents/flusseract/example/macos/Pods/Pods/flusseract/lib' ld: warning: ignoring file /opt/homebrew/lib/libpng.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/lib/libjpeg.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/lib/liblzma.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/lib/libleptonica.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/lib/libtesseract.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/lib/libzstd.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/lib/libtiff.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64: "tesseract::TessBaseAPI::GetDatapath()", referenced from: _GetDataPath in flusseract.o "tesseract::TessBaseAPI::GetHOCRText(int)", referenced from: _HOCRText in flusseract.o "tesseract::TessBaseAPI::GetIterator()", referenced from: _GetBoundingBoxes in flusseract.o _GetBoundingBoxesVerbose in flusseract.o "tesseract::TessBaseAPI::GetUTF8Text()", referenced from: _UTF8Text in flusseract.o "tesseract::TessBaseAPI::SetVariable(char const, char const)", referenced from: _SetVariable in flusseract.o "tesseract::TessBaseAPI::ProcessPages(char const, char const, int, tesseract::TessResultRenderer)", referenced from: _ProcessDocumentFile in flusseract.o "tesseract::TessBaseAPI::SetPageSegMode(tesseract::PageSegMode)", referenced from: _SetPageSegMode in flusseract.o "tesseract::TessBaseAPI::SetSourceResolution(int)", referenced from: _SetPixImage in flusseract.o "tesseract::TessBaseAPI::ClearPersistentCache()", referenced from: _ClearPersistentCache in flusseract.o "tesseract::TessBaseAPI::GetSourceYResolution()", referenced from: _SetPixImage in flusseract.o "tesseract::TessBaseAPI::End()", referenced from: _Destroy in flusseract.o "tesseract::TessBaseAPI::Init(char const, char const*, tesseract::OcrEngineMode, char*, int, std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::__1::allocator > > > const, std::1::vector<std::1::basic_string<char, std::1::char_traits, std::1::allocator >, std::1::allocator<std::__1::basic_string<char, std::1::char_traits, std::__1::allocator > > > const, bool)", referenced from: _GetDataPath in flusseract.o _Init in flusseract.o "tesseract::TessBaseAPI::Clear()", referenced from: _Destroy in flusseract.o _Clear in flusseract.o "tesseract::TessBaseAPI::Version()", referenced from: _Version in flusseract.o "tesseract::TessBaseAPI::SetImage(Pix)", referenced from: _SetPixImage in flusseract.o "tesseract::TessBaseAPI::Recognize(tesseract::ETEXT_DESC)", referenced from: _GetBoundingBoxes in flusseract.o _GetBoundingBoxesVerbose in flusseract.o "tesseract::TessBaseAPI::TessBaseAPI()", referenced from: _Create in flusseract.o _GetDataPath in flusseract.o "tesseract::TessBaseAPI::~TessBaseAPI()", referenced from: _GetDataPath in flusseract.o "tesseract::TessTextRenderer::TessTextRenderer(char const)", referenced from: _ProcessDocumentFile in flusseract.o "tesseract::TessBaseAPI::GetPageSegMode() const", referenced from: _GetPageSegMode in flusseract.o "tesseract::PageIterator::BoundingBox(tesseract::PageIteratorLevel, int, int, int, int) const", referenced from: _GetBoundingBoxes in flusseract.o _GetBoundingBoxesVerbose in flusseract.o "tesseract::PageIterator::Empty(tesseract::PageIteratorLevel) const", referenced from: _GetBoundingBoxesVerbose in flusseract.o "tesseract::LTRResultIterator::Confidence(tesseract::PageIteratorLevel) const", referenced from: _GetBoundingBoxes in flusseract.o _GetBoundingBoxesVerbose in flusseract.o "_pixDestroy", referenced from: _DestroyPixImage in flusseract.o "_pixGetHeight", referenced from: _GetPixImageHeight in flusseract.o "_pixGetWidth", referenced from: _GetPixImageWidth in flusseract.o "_pixRead", referenced from: _CreatePixImageByFilePath in flusseract.o "_pixReadMem", referenced from: _CreatePixImageFromBytes in flusseract.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) BUILD FAILED

Building macOS application...
Build process failed