3

この sh ファイルを使用して、leptonica と tesseract のバイナリをコンパイルしました。でファイルをチェックしましたがlipo -info、これが結果です:

Architectures in the fat file: /Users/username/Desktop/tess/lib/libtesseract_all.a are: armv7s armv7 i386 x86_64 arm64
Architectures in the fat file: /Users/username/Desktop/tess/lib/liblept.a are: armv7s armv7 i386 x86_64 arm64  

64ビットアーキテクチャをサポートしているという意味だと思います。しかし、プロジェクトでインポートして使用すると、次のようになりました。

ld: warning: ignoring file /Users/username/Desktop/project/projectname/tesseract-ios-lib-master/lib/libtesseract_all.a, missing required architecture x86_64 in file /Users/username/Desktop/project/projectname/tesseract-ios-lib-master/lib/libtesseract_all.a (3 slices)
ld: warning: ignoring file /Users/username/Desktop/project/projectname/tesseract-ios-lib-master/lib/liblept.a, missing required architecture x86_64 in file /Users/username/Desktop/project/projectname/tesseract-ios-lib-master/lib/liblept.a (3 slices)
Undefined symbols for architecture x86_64:
  "tesseract::TessBaseAPI::GetBoxText(int)", referenced from:
      -[Tesseract characterBoxes] in Tesseract.o
  "tesseract::TessBaseAPI::GetIterator()", referenced from:
      -[Tesseract getConfidences:] in Tesseract.o
  "tesseract::TessBaseAPI::GetUTF8Text()", referenced from:
      -[Tesseract recognizedText] in Tesseract.o
  "tesseract::TessBaseAPI::SetVariable(char const*, char const*)", referenced from:
      -[Tesseract setVariableValue:forKey:] in Tesseract.o
      -[Tesseract loadVariables] in Tesseract.o
  "tesseract::TessBaseAPI::SetRectangle(int, int, int, int)", referenced from:
      -[Tesseract setRect:] in Tesseract.o
  "tesseract::TessBaseAPI::Init(char const*, char const*, tesseract::OcrEngineMode, char**, int, GenericVector<STRING> const*, GenericVector<STRING> const*, bool)", referenced from:
      tesseract::TessBaseAPI::Init(char const*, char const*) in Tesseract.o
  "tesseract::TessBaseAPI::Version()", referenced from:
      +[Tesseract version] in Tesseract.o
  "tesseract::TessBaseAPI::SetImage(Pix const*)", referenced from:
      -[Tesseract setImage:] in Tesseract.o
  "tesseract::TessBaseAPI::Recognize(ETEXT_DESC*)", referenced from:
      -[Tesseract recognize] in Tesseract.o
  "tesseract::TessBaseAPI::TessBaseAPI()", referenced from:
      -[Tesseract initPrivateWithDataPath:language:] in Tesseract.o
  "tesseract::ImageThresholder::GetPixRect()", referenced from:
      -[Tesseract setImage:] in Tesseract.o
  "tesseract::ImageThresholder::SetImage(unsigned char const*, int, int, int, int)", referenced from:
      -[Tesseract setImage:] in Tesseract.o
  "tesseract::ImageThresholder::ImageThresholder()", referenced from:
      -[Tesseract setImage:] in Tesseract.o
  "tesseract::PageIterator::BoundingBox(tesseract::PageIteratorLevel, int*, int*, int*, int*) const", referenced from:
      -[Tesseract getConfidences:] in Tesseract.o
  "tesseract::LTRResultIterator::Confidence(tesseract::PageIteratorLevel) const", referenced from:
      -[Tesseract getConfidences:] in Tesseract.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

これにより、Apple が 2 月 1 日以降のすべてのアプリは 64 ビットをサポートする必要があると発表したため、AppStore で自分のアプリを更新できなくなります。

4

0 に答える 0