gali8 / Tesseract-OCR-iOS

Tesseract OCR iOS is a Framework for iOS7+, compiled also for armv7s and arm64.
http://www.nexor.it
MIT License
4.22k stars 949 forks source link

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

Closed pbrewczynski closed 8 years ago

pbrewczynski commented 8 years ago

I've tried to compile with Tesseract-OCR-iOS (stable release) added via Cocoapods.

Is something wrong with bitcode on Tesseract or any dependency?

Of course disabling bitcode fixes problem.

When I remove "-weak_library" from:

"OTHER_LDFLAGS = $(inherited) -ObjC -weak_library /usr/lib/libstdc++.6.0.9.dylib -l"TesseractOCRiOS" -l"lept" -l"stdc++" -l"tesseract_all" -framework "Foundation" -framework "UIKit""

in Pods.debug.xconfig

I get:

d: '/Users/pbrewczynski/Dev/[[NAME OF PROJECT]]/Pods/TesseractOCRiOS/TesseractOCR/lib/libtesseract_all.a(strngs.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64

I also noted that in 9.2 "libz.dylib" is renamed to "libz.tbd"

Paul

ws233 commented 8 years ago

Pls, try developer version. Closing as a dublication.