使用 xcode 4.5.2 构建 sqlcipher 时遇到问题。基本上我遵循了http://mobileorchard.com/tutorial-iphone-sqlite-encryption-with-sqlcipher/和http://sqlcipher.net/ios-tutorial/的示例。不幸的是,我最后得到一条消息,告诉我ssl lib和sqlcipher lib不是为armv7s构建的。
错误讯息:
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:
...
我知道这已发布了几次,但我已经更改了openssl和sqlcipher项目的目标架构,正如您在下面的屏幕截图中看到的那样。
OpenSSL的: 的 sqlcipher :
我真的有点被困在这里:(有人对我有暗示吗?
答案 0 :(得分:4)
尝试将仅调试的构建活动架构设置为NO! change either config of openssl and sqlcipher
答案 1 :(得分:2)
之前我遇到过类似的问题,尝试删除armv7s并只留下armv7
答案 2 :(得分:2)
将 libsqlite3.dylib 添加到构建阶段&#39;列表清单。
选择您的项目目标 - &gt;建立阶段:
将 libsqlite3.dylib 添加到将二进制文件链接到库