如何向iPhone项目添加第三方框架?

编程入门 行业动态 更新时间:2024-10-06 01:42:42
本文介绍了如何向iPhone项目添加第三方框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在我的iPhone应用程序中使用PLDatabase框架。我已经添加框架到我的Xcode项目。但是,当我运行我的应用程序,它崩溃与以下错误:

I am trying to use the PLDatabase framework in my iPhone app. I've added the framework to my Xcode project. However, when I run my app, it crashes with the following error:

dyld: Library not loaded: @loader_path/../Frameworks/PlausibleDatabase.framework/Versions/A/PlausibleDatabase Referenced from: /Users/todd/Library/Application Support/iPhone Simulator/User/Applications/BB3C66B2-A5BB-4329-B163-AB0072411AF1/Congress.app/Congress Reason: image not found

我不确定框架需要什么

感谢

推荐答案

不支持嵌入式框架的动态链接。虽然你可能能够使模拟器工作,但它不会在设备上工作。如果你想使用代码,你必须为框架(libpldatabase.a)构建静态库,然后将它们链接到应用程序。

iPhone does not support dynamic linking of embedded frameworks. While you might be able to finagle the simulator to work, it will not work on the device. If you want to use the code you must build the static library for the framework (libpldatabase.a), and then link them to the app.

Xcode GUI不为静态链接提供一个很好的接口,你将需要在你的构建prefs(-lpldatabase -L / whatever / dir / it / is / in)中添加适当的标志。

The Xcode GUI does not provide a nice interface for static linking, you will need to add appropriate flags in your build prefs (-lpldatabase -L/whatever/dir/it/is/in).

更多推荐

如何向iPhone项目添加第三方框架?

本文发布于:2023-11-26 09:37:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633591.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:第三方   框架   项目   iPhone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!