I'm having problems building a project for archive which includes SQLCipher and OpenSSL.
The project builds fine in the Simulator and the on my iphone but when building for Ad-Hoc distribution (using the correct Ad-Hoc scheme) it builds but results in the error:
Ld "/Users/macuser/Library/Developer/Xcode/DerivedData/BlahHealthcare-frojqoeewvysjpcgcdtltizzbdri/ArchiveIntermediates/BlahHealthcare/IntermediateBuildFilesPath/BlahHealthcare.build/Ad Hoc-iphoneos/BlahHealthcare.build/Objects-normal/armv6/BlahHealthcare" normal armv6 cd "/Users/macuser/Projects/BlahHealthcare" setenv IPHONEOS_DEPLOYMENT_TARGET 4.3 setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk "-L/Users/macuser/Library/Developer/Xcode/DerivedData/BlahHealthcare-frojqoeewvysjpcgcdtltizzbdri/ArchiveIntermediates/BlahHealthcare/BuildProductsPath/Ad Hoc-iphoneos" "-L/Users/macuser/Projects/BlahHealthcare" "-F/Users/macuser/Library/Developer/Xcode/DerivedData/BlahHealthcare-frojqoeewvysjpcgcdtltizzbdri/ArchiveIntermediates/BlahHealthcare/BuildProductsPath/Ad Hoc-iphoneos" -filelist "/Users/macuser/Library/Developer/Xcode/DerivedData/BlahHealthcare-frojqoeewvysjpcgcdtltizzbdri/ArchiveIntermediates/BlahHealthcare/IntermediateBuildFilesPath/BlahHealthcare.build/Ad Hoc-iphoneos/BlahHealthcare.build/Objects-normal/armv6/BlahHealthcare.LinkFileList" -dead_strip -lxml2 -miphoneos-version-min=4.3 -lcrypto -lsqlcipher -framework Foundation -framework UIKit -framework CoreGraphics -licucore.A -framework CFNetwork -framework SystemConfiguration -framework MobileCoreServices -lz.1开发者_运维问答.2.3 -framework Security -o "/Users/macuser/Library/Developer/Xcode/DerivedData/BlahHealthcare-frojqoeewvysjpcgcdtltizzbdri/ArchiveIntermediates/BlahHealthcare/IntermediateBuildFilesPath/BlahHealthcare.build/Ad Hoc-iphoneos/BlahHealthcare.build/Objects-normal/armv6/BlahHealthcare"
ld: library not found for -lcrypto collect2: ld returned 1 exit status Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
Everything appears to be configured correct so I've no idea where to go from here. I've tried various answers on other posts and none of them seem to work.
Does anyone have any idea where I'm going wrong?
Looks like you're building for armv6 only (not armv6+armv7, or just armv7), which can be a bit troublesome with Xcode 4.2 and the build system, since it seems to be defaulting to armv7 these days and dropping support for armv6. In any event, we recently updated the OpenSSL-Xcode and SQLCipher Xcode project build settings such that most builds will work successfully on both Debug and Release, providing that the "sub-projects"1 have an ARCHS setting matching the main project being built. Currently we're defaulting this to both armv6 and armv7.
What you should do is grab the latest versions of OpenSSL-Xcode and SQLCipher, check your project settings against our updated tutorial, and if that all matches up, adjust the ARCHITECTURES
setting in the Build Settings for your main project file, and in the two dependency projects to contain only "armv6."
[1] The "sub-projects" don't inherit any settings as is commonly supposed, so it's a bit of a misnomer, thus the scare-quotes.
精彩评论