簡體   English   中英

命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex失敗,退出代碼為1

[英]Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1

我試圖在我的資源包中包含一個文件,文件包含以下內容:

LeadPunc="({[`'
TrailPunc=}:;-]!?`,.)"'
NumLeadPunc=#({[@$
NumTrailPunc=}):;].,%
Operators=*+-/.:,()[]
Digits=0123456789
Alphas=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
*extra line*

這些文件被稱為:

eng.cube.lm

我得到的錯誤是:

IExpenseReporter/tessdata/eng.cube.lm:6: premature EOF
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1

此文件與最新版本的tesseract(OCR)一起使用。 有誰知道導致此錯誤的原因以及如何解決?

將tessdata文件夾添加到項目時,請確保選擇“創建文件夾引用”選項。

文檔

注意:此庫當前要求將tessdata文件夾鏈接為引用的文件夾而不是符號組。 如果Tesseract在您自己的項目中找不到語言文件,可能是因為您創建了tessdata文件夾作為符號組而不是引用的文件夾。 如果你正確地做了它應該是這樣的:

在此輸入圖像描述

請注意tessdata文件夾如何有一個藍色圖標,表示它是作為引用文件夾而不是符號組導入的。

刪除當前文件夾並將其再次添加為文件夾引用應該可以解決問題。

XCode“認為”這是一個lex文件並嘗試通過調用lex來處理它。 但是,lex發現和不平衡的引用因此過早結束文件。

您應該嘗試顯式調用指定的工具。

我有這個問題,我發現將文件夾“tessdata”從語言zip復制到項目目錄而不是Xcode修復了問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

相關問題 Xcode 7失敗,命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為1 錯誤:命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang失敗,退出代碼為1 錯誤:命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為1 XCode - 命令 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 失敗,退出代碼 1 Xcode 8.0 命令 /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc 失敗,退出代碼為 1 生成失敗並顯示錯誤命令/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc Swift編譯器錯誤:命令/Applications/Xcode9.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc失敗,退出代碼為6 找不到選項“-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator”的目錄 命令 /Xcode.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/usr/bin/swiftc 失敗,退出代碼為 1 xcode和avr arduino“命令/Applications/Xcode.app/Contents/Developer/usr/bin/make失敗,出現退出代碼2”錯誤。
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM