使用 XCode 4.0 创建通用二进制文件

发布于 2024-10-18 17:40:29 字数 93 浏览 7 评论 0原文

我最近在我的系统中安装了XCode 4.0。我需要为我的桌面应用程序之一创建通用二进制文件。我如何在 XCode 4.0 中执行此操作?

谢谢和问候, 迪帕

I have installed XCode 4.0 in my system recently. I need to create universal binary for one of my Desktop app. How do I do this in XCode 4.0?

Thanks and Regards,
Deepa

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

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

发布评论

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

评论(1

微暖i 2024-10-25 17:40:29

要同时为多个“架构”构建二进制文件,请在构建设置中选择哪些架构应用于发布构建,然后进行发布构建,这意味着在 Xcode 4 中,首先创建第二个构建发布的方案(因为您的默认方案很可能构建调试),选择此方案并构建它。或者通用二进制是指带有 Intel 和 PPC 代码的二进制吗?那么,在这种情况下,答案是:Xcode4 不再支持 PPC。正式而言,您必须使用 Xcode3 创建包含 Intel 和 PPC 架构代码的二进制文件。 Xcode4仅支持两种Mac架构:Intel 32位和Intel 64位;但是,可以将构建配置配置为同时构建这两者,并将代码放入单个二进制文件中,这也将是某种通用二进制文件。

您可以将 PPC 支持带回 Xcode4,如下所示 此处进行了描述,但在应用此类黑客之前,您应该真正了解自己在做什么。

To build a binary for more than one "architecture" at the same time, select in the build settings which architectures shall be used for release builds and then make a release build, which means in Xcode 4, first create a second scheme that builds release (since your default scheme most likely builds debug), select this scheme and build it. Or was universal binary referring to a binary with Intel and PPC code? Well, in that case the answer is: Xcode4 does not support PPC any longer. Officially you have to use Xcode3 to create binaries that contain code for Intel and PPC architectures. Xcode4 only supports two Mac architectures: Intel 32 bit and Intel 64 bit; however a build configuration can be configured to build for both of these at the same time and put the code into a single binary, which would also be some kind of universal binary.

You can bring PPC support back to Xcode4 as described here, but you should really know what you are doing before you are applying hacks like that one.

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