导入的库与构建不兼容

发布于 2025-01-01 21:59:03 字数 543 浏览 6 评论 0原文

我已经编译了 Berkeley DB 库并包含在 Xcode 4.2 中的 iOS 项目中。该项目编译得很好,但是当我运行它时,出现以下错误:

BDB1539 构建签名与环境不匹配

.

.

.

这里有很多例外,没有有用的信息

.

.

.

终止调用抛出异常(gdb)

项目是Xcode 自带的模板之一。我唯一改变的是添加 berkeley 库的标头,链接库本身并在模型控制器的 init 中创建数据库的实例。

我在库上运行 lipo 以确保它是正确的架构,并得到以下结果:

>lipo -info libdb_cxx-5.3.a 
input file libdb_cxx-5.3.a is not a fat file
Non-fat file: libdb_cxx-5.3.a is architecture: i386

它似乎是正确的架构。

调试这里出现问题的合理方法是什么?

I've compiled the Berkeley DB library and included in my iOS project in Xcode 4.2. The project compiles just fine, but when I run it I get the following error:

BDB1539 Build signature doesn't match environment

.

.

.

lots of exceptions here with no useful information

.

.

.

terminate called throwing an exception(gdb)

The project is one of the templates that comes with Xcode. The only thing I've changed is added the header for the berkeley library, linked the library itself and created an instance of the DB in the init of the model controller.

I ran lipo on the library to make sure it was the correct architecture and got the following result:

>lipo -info libdb_cxx-5.3.a 
input file libdb_cxx-5.3.a is not a fat file
Non-fat file: libdb_cxx-5.3.a is architecture: i386

It appears to be the correct architecture.

What is a reasonable way of debugging what is going wrong here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

断肠人 2025-01-08 21:59:03

实际上,也有这个问题,它发生是因为我使用调试库创建了数据库,并尝试稍后使用发布打开它。人们需要注意的一些事情...

Actually, also had this problem, and it happened because I created my database with the debug library and tried to open it later using release. Something for people to be aware of...

就是爱搞怪 2025-01-08 21:59:03

事实证明,“构建签名与环境不匹配”是 Berkeley DB 异常,当我传入 unix 路径而不是 iOS 路径作为环境的数据库位置时触发。

It turns out "Build signature doesn't match environment" is a Berkeley DB exception that I triggered when I passed in a unix path instead of an iOS path as the DB location for the environment.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文