0

I am using tesseract api in my iPhone app for IOS SDK 7.0 in Xcode 5, which run perfectly on simulator but on test devise (real device) it is showing an error i.e "apple mach -o linker error linker command failed with exit code 1", please any body help me to solve the problem. Problem is:-

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/Users/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.A -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 /Users/newtechfusion/Library/Developer/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

"ld: file is universal (2 slices) but does not contain a(n) armv7 slice: /Users/newtechfusion/Downloads/CardScan-master 5/tesseract-ocr/outdir/libtesseract_api.a file '/Users/newtechfusion/Downloads/CardScan-master 5/tesseract-ocr/outdir/libtesseract_api.a' for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)"

!Linker command failed with exit code 1 (use -v to see invocation)

Praful
  • 132
  • 1
  • 10

1 Answers1

0

This means your library "libtesseract_api.a" is not compiled for armv7. You need library same library compiled with armv7. If you still want to use this library you will have to remove support for armv7 (better you compile library with armv7 as armv7, armv7s are used in most of iOS devices) go to Project -> Build Settings -> remove the architecture armv7 from "valid architectures". And set "Build Active Architecture Only" to Yes as you want to build app for configured architecture

Aditya Deshmane
  • 4,676
  • 2
  • 29
  • 35