robertoferraz / OCRSlicer

Detects the presence of texts on your UIImage, slices the words in different exportable images together with the string detected (using TesseractOCRiOS)
MIT License
29 stars 3 forks source link

Error While running the example app #2

Open mithrasvs opened 6 years ago

mithrasvs commented 6 years ago

Thank you for sharing the code. I was trying to run the example, it is throwing me following error:

ld: -weak_library and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together

Ld /Users/name/Library/Developer/Xcode/DerivedData/OCR_test-hagzrcymgyafiogneylbokfxdhsu/Build/Products/Debug-iphoneos/TesseractOCRiOS/TesseractOCR.framework/TesseractOCR normal arm64 cd "/Users/name/Downloads/OCRSlicer-master/Example/OCR test/Pods" export IPHONEOS_DEPLOYMENT_TARGET=8.0 export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -L/Users/name/Library/Developer/Xcode/DerivedData/OCR_test-hagzrcymgyafiogneylbokfxdhsu/Build/Products/Debug-iphoneos/TesseractOCRiOS -L/Users/name/Downloads/OCRSlicer-master/Example/OCR\ test/Pods/TesseractOCRiOS/TesseractOCR/lib -F/Users/name/Library/Developer/Xcode/DerivedData/OCR_test-hagzrcymgyafiogneylbokfxdhsu/Build/Products/Debug-iphoneos/TesseractOCRiOS -filelist /Users/name/Library/Developer/Xcode/DerivedData/OCR_test-hagzrcymgyafiogneylbokfxdhsu/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TesseractOCRiOS.build/Objects-normal/arm64/TesseractOCR.LinkFileList -install_name @rpath/TesseractOCR.framework/TesseractOCR -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/name/Library/Developer/Xcode/DerivedData/OCR_test-hagzrcymgyafiogneylbokfxdhsu/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TesseractOCRiOS.build/Objects-normal/arm64/TesseractOCR_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -weak_library /usr/lib/libstdc++.6.0.9.dylib -llept -lstdc++ -ltesseract_all -framework Foundation -framework UIKit -framework Foundation -framework UIKit -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/name/Library/Developer/Xcode/DerivedData/OCR_test-hagzrcymgyafiogneylbokfxdhsu/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/TesseractOCRiOS.build/Objects-normal/arm64/TesseractOCR_dependency_info.dat -o /Users/name/Library/Developer/Xcode/DerivedData/OCR_test-hagzrcymgyafiogneylbokfxdhsu/Build/Products/Debug-iphoneos/TesseractOCRiOS/TesseractOCR.framework/TesseractOCR

ld: -weak_library and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation)

Can you please help me with this.

keegho commented 6 years ago

You have to close the bit code from the build settings of both the pods and the app itself. screen shot 2018-09-03 at 6 20 29 pm

invisionjeremy commented 6 years ago

Thank you @keegho. I ran into the same issue. Just to be explicit, you need to make sure the overall Project Build Settings are set to Enable Bitcode=NO as well as each Pods Build Settings. That solved this issue for me @mithrasvs