0

我在我的 iPhone 应用程序中为 Xcode 5 中的 IOS SDK 7.0 使用 tesseract api,它在模拟器上完美运行,但在测试设备(真实设备)上显示错误,即“apple mach -o linker error linker command failed with exit code 1 “,请任何人帮我解决问题。问题是:-

ld /Users/newtechfusion/Library/Developer/Xcode/DerivedData/CardScan-cycclrddpdetmngbjcyzotcszjfe/Build/Products/Debug-iphoneos/CardScan.app/CardScan normal armv7 cd "/Users/newtechfusion/Downloads/CardScan-master 5" setenv IPHONEOS_DEPLOYMENT_TARGET 7.0 setenv PATH "/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin:/usr/bin:/bin :/usr/sbin:/sbin" /Applications/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode\ 2.app/Contents/Developer /Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0。sdk -L/Users/newtechfusion/Library/Developer/Xcode/DerivedData/CardScan-cycclrddpdetmngbjcyzotcszjfe/Build/Products/Debug-iphoneos -L/Users/newtechfusion/Downloads/CardScan-master\ 5/tesseract-ocr/outdir -F/用户/newtechfusion/Library/Developer/Xcode/DerivedData/CardScan-cycclrddpdetmngbjcyzotcszjfe/Build/Products/Debug-iphoneos -filelist /Users/newtechfusion/Library/Developer/Xcode/DerivedData/CardScan-cycclrddpdetmngbjcyzotcszjfe/Build/Intermediates/CardScan.build/ Debug-iphoneos/CardScan.build/Objects-normal/armv7/CardScan.LinkFileList -fobjc-link-runtime -stdlib=libstdc++ -miphoneos-version-min=7.0 -framework QuartzCore -framework CFNetwork -framework SystemConfiguration -framework Security -framework CoreData -framework Foundation -framework UIKit -framework CoreGraphics -licucore。一个 -ltesseract_api -ltesseract_ccstruct -ltesseract_ccutil -ltesseract_classify -ltesseract_cutil -ltesseract_dict -ltesseract_image -ltesseract_main -ltesseract_textord -ltesseract_training -ltesseract_viewer -ltesseract_wordrec -framework AddressBook -framework AddressBookUI -lsqlite3.0 -Xlinker -dependency_info -Xlinker//new fusion/ Xcode/DerivedData/CardScan-cycclrddpdetmngbjcyzotcszjfe/Build/Intermediates/CardScan.build/Debug-iphoneos/CardScan.build/Objects-normal/armv7/CardScan_dependency_info.dat -o /Users/newtechfusion/Library/Developer/Xcode/DerivedData/CardScan- cycclrddpdetmngbjcyzotcszjfe/Build/Products/Debug-iphoneos/CardScan.app/CardScan应用程序/卡片扫描应用程序/卡片扫描build/Debug-iphoneos/CardScan.build/Objects-normal/armv7/CardScan_dependency_info.dat -o /Users/newtechfusion/Library/Developer/Xcode/DerivedData/CardScan-cycclrddpdetmngbjcyzotcszjfe/Build/Products/Debug-iphoneos/CardScan.app/卡片扫描build/Debug-iphoneos/CardScan.build/Objects-normal/armv7/CardScan_dependency_info.dat -o /Users/newtechfusion/Library/Developer/Xcode/DerivedData/CardScan-cycclrddpdetmngbjcyzotcszjfe/Build/Products/Debug-iphoneos/CardScan.app/卡片扫描

" ld: 文件是通用的 (2 片) 但不包含 (n) armv7 片: /Users/newtechfusion/Downloads/CardScan-master 5/tesseract-ocr/outdir/libtesseract_api.a 文件 '/Users/newtechfusion/Downloads /CardScan-master 5/tesseract-ocr/outdir/libtesseract_api.a' 对于架构 armv7 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

!Linker 命令失败,退出代码为 1(使用 -v 查看调用)

4

1 回答 1

0

这意味着您的库“libtesseract_api.a”不是为 armv7 编译的。您需要使用 armv7 编译的库相同的库。如果您仍想使用此库,则必须删除对 armv7 的支持(最好使用 armv7 编译库作为 armv7,大多数 iOS 设备都使用 armv7s)Project -> Build Settings ->从“有效架构”中删除架构 armv7。并将“仅构建活动架构”设置为是,因为您想为配置的架构构建应用程序

于 2013-10-30T21:05:04.353 回答