cloudnaut
cloudnaut

Reputation: 982

SQLCipher in ios6 Undefined symbols for architecture armv7s (architecture already changed)

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 here sqlcipher: enter image description here

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

Upvotes: 2

Views: 1526

Answers (3)

hasan
hasan

Reputation: 24205

Add libsqlite3.dylib to Build Phases' Liraries List.

Select your project target -> Build Phases:

Add libsqlite3.dylib to Link Binary With Libraries

Upvotes: 2

xwwxy
xwwxy

Reputation: 166

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

Upvotes: 4

Ismael
Ismael

Reputation: 3937

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

Upvotes: 2

Related Questions