2

我在使用xcode 4.5.2构建sqlcipher时遇到问题。基本上我遵循了http://mobileorchard.com/tutorial-iphone-sqlite-encryption-with-sqlcipher/http://sqlcipher.net/ios-tutorial/上的示例。不幸的是,我最终收到一条消息,告诉我 ssl 库和 sqlcipher 库不是为 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在此处输入图像描述

我真的有点卡在这里:(有人对我有提示吗?

4

3 回答 3

4

尝试将仅调试的构建活动架构设置为 NO! 更改 openssl 和 sqlcipher 的任一配置

于 2013-04-23T04:56:59.223 回答
2

我之前遇到过非常相似的问题,尝试删除 armv7s 并只保留 armv7

于 2012-12-24T12:04:27.907 回答
2

libsqlite3.dylib添加到Build Phases的 Liraries 列表中。

选择您的项目目标 -> 构建阶段:

添加libsqlite3.dylib以将二进制文件与库链接

于 2014-10-27T14:07:45.717 回答