2
votes

I have a problem building sqlcipher with xcode 4.5.2. Basically I followed the examples at http://mobileorchard.com/tutorial-iphone-sqlite-encryption-with-sqlcipher/ and http://sqlcipher.net/ios-tutorial/ . Unfortunately I end up with a message telling me that the ssl lib and the sqlcipher lib are not build for armv7s.

Error message:

ld: warning: ignoring file /Users/jeven/Library/Developer/<...>/Debug-iphoneos/libsqlcipher.a, file was built for archive which is not the architecture being linked (armv7s): /Users/jeven/Library/Developer/<...>/Debug-iphoneos/libsqlcipher.a
ld: warning: ignoring file /Users/jeven/Library/Developer/<...>/Debug-iphoneos/libcrypto.a, file was built for archive which is not the architecture being linked (armv7s): /Users/jeven/Library/Developer/<...>/Debug-iphoneos/libcrypto.a

Undefined symbols for architecture armv7s:
      "_sqlite3_prepare_v2", referenced from:
...

I know this has been posted a couple of times but I already changed the target architecture for the openssl and the sqlcipher projects, as you can see in the following screen shots.

openssl: enter image description heresqlcipher: enter image description here

I am really kind of stuck here :( Does anyone has a hint for me?

3
Stephen Lombardo (sqlcipher) will have a look at it (if it's a bug). Outcome can be traced at: github.com/sqlcipher/sqlcipher/issues/44 - cloudnaut
I have the same issue. I've added my comments to the post. Waiting for an answer. Hopefully Stephen will give some good inputs. - lucasart

3 Answers

2
votes

I've had a very similar problem before, try removing the armv7s and leave only the armv7

4
votes

try set build active architecture only of debug to NO! change either config of openssl and sqlcipher

2
votes

Add libsqlite3.dylib to Build Phases' Liraries List.

Select your project target -> Build Phases:

Add libsqlite3.dylib to Link Binary With Libraries