【问题标题】:SQLCipher in ios6 Undefined symbols for architecture armv7s (architecture already changed)ios6 中的 SQLCipher 架构 armv7s 的未定义符号(架构已更改)
【发布时间】:2012-12-24 11:49:44
【问题描述】:

我在使用 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

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

【问题讨论】:

  • Stephen Lombardo (sqlcipher) 将查看它(如果它是一个错误)。结果可追溯至:github.com/sqlcipher/sqlcipher/issues/44
  • 我也有同样的问题。我已将我的 cmets 添加到 post。等待答案。希望斯蒂芬能提供一些好的意见。

标签: iphone ios ios6 sqlcipher


【解决方案1】:

尝试将仅调试的构建活动架构设置为 NO! change either config of openssl and sqlcipher

【讨论】:

  • +1 在 sqlcipher 项目上将 Build Active architectures 设置为 NO 有帮助。
【解决方案2】:

我之前也遇到过类似的问题,试试去掉armv7s,只留下armv7

【讨论】:

  • 嗨,非常感谢您的回答,它似乎可以工作,但它仍然可以在 iPhone 5 (armv7s) 上运行吗?我没有 iPhone 5,只有 iPhone 4s。
  • 当然,AppStore 上有大量为 armv7 构建的应用程序,它们运行良好 :)
  • ...然后我想它已经解决了:D 谢谢伊斯梅尔(我不知道为什么我在谷歌上找不到它)
  • 从 sqlcipher 中删除 armv7s 并没有解决问题——至少对我来说是这样。从主项目中删除 armv7s 似乎并不理想。还有其他想法吗?
【解决方案3】:

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

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

libsqlite3.dylib 添加到 Link Binary With Libraries

【讨论】:

  • 是的!这是我的问题。但我必须添加 libsqlcipher.a,而不是 libsqlite3.dylib。请注意,此问题适用于 SQL 密码。但是一个非常相似的修复,谢谢。
猜你喜欢
  • 1970-01-01
  • 2013-01-27
  • 1970-01-01
  • 1970-01-01
  • 2012-10-04
  • 1970-01-01
  • 1970-01-01
  • 2012-12-14
  • 2016-04-29
相关资源
最近更新 更多