创建通用应用程序时,如何链接到32位和64位版本分开的框架?

发布于 2024-10-02 22:02:06 字数 504 浏览 0 评论 0原文

我的情况:

  • 我想在Xcode 3.2.2中创建i386和x86_64的通用应用程序
  • 该应用程序有依赖的第三方框架。
  • 该框架只有 i386 和 x86_64 的单独版本,没有通用版本。
  • 我将 i386 和 x86_64 版本添加到目标的 Link Binary With Libraries 部分。

我的问题:

构建 x86_64 版本时,Xcode 无法从框架中找到符号。看起来 Xcode 只通过命令行参数“-framework $FRAMEWORK_NAME”在 i386 版本的框架中搜索符号。

我的问题:

如何让 Xcode 也从 x86_64 框架搜索符号?或者在构建通用应用程序时是否可以链接到非通用库?

我的进展:

我想通过 lipo 创建这个框架的通用版本可能会解决这个问题,但如果可能的话,我想避免这种情况。因为它涉及到一些外部的变化。

谢谢

My situation:

  • I want to create a universal application of i386 and x86_64 in Xcode 3.2.2
  • This application has a dependent third-party framework.
  • This framework only has separated versions for i386 and x86_64, no universal version.
  • I added both of the i386 and x86_64 versions into the Link Binary With Libraries section of my target.

My problem:

Xcode cannot find symbols from the framework when building a x86_64 version. Looks like Xcode only search symbols in the i386 version of framework, by command line arguments "-framework $FRAMEWORK_NAME".

My question:

How could I make Xcode also search symbols from the x86_64 framework? Or is it possible to link to a non-universal library when building a universal application?

My progress:

I guess that creating a universal version of this framework by lipo maybe solves this problem, but if possible, I would like to avoid this. Because it involves some external changes.

Thanks

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

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

发布评论

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

评论(3

蓝天 2024-10-09 22:02:06

您可以创建应用程序的两个版本,并将它们一起 lipo ,但如果您只 lipo 框架本身,这可能是最简单的。您没有理由需要影响外部库的构建过程;您可以将其作为您自己的应用程序构建过程的一部分来完成。

You can create two versions of your app and lipo them together, but it's probably easiest if you just lipo the framework itself. There's no reason you need to affect the external library's build process; you can just do it in place as part of the build process for your own app.

热鲨 2024-10-09 22:02:06

或者,您可以链接应用程序的两个单独版本,然后使用 lipo 将它们连接起来。

Alternatively, you could link two separate versions of your app, and the join those with lipo.

乙白 2024-10-09 22:02:06

让框架构建脂肪(或将两个切片“lipo”在一起)是迄今为止最优雅的解决方案。有理由不这样做吗?

Getting the framework to build fat (or lipoing together the two slices) is by far the most elegant solution. Is there a reason to not do that?

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