title: SQLCipher, Xcode 4 and creating an IPA
body: <p>I'm having problems building a project for archive which includes SQLCipher and OpenSSL.</p>
  
  <p>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:</p>
  
  <p>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"</p>
  
  <p>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</p>
  
  <p>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.</p>
  
  <p>Does anyone have any idea where I'm going wrong?</p>