在 iOS 工具链上链接 PhoneGap 框架

发布于 2025-01-01 00:16:52 字数 1631 浏览 0 评论 0原文

再次向 Stack Overflow 社区问好!我非常感谢您在此事上的帮助。

最近我编译并安装了 iOS CentOS 6.2 i386 上的工具链在 Windows 7 Home Premium x64 上的 VirtualBox 中运行。测试 HelloWorld 应用程序构建并运行正常,但链接器给出警告:ld: warning: -force_cpusubtype_ALL will变得不受 ARM 架构的支持

然后,我从 http://phonegap.com 下载 PhoneGap,提取 iOS 框架并将其放入 /usr /arm-apple-darwin10/System/Library/Frameworks/PhoneGap.framework。之后,我修改了 HelloWorld Makefile 以包含以下几行(PhoneGap 所需的框架):

override LDFLAGS += -lobjc
override LDFLAGS += -framework UIKit
override LDFLAGS += -framework Foundation
override LDFLAGS += -framework CoreFoundation
override LDFLAGS += -framework AddressBookUI
override LDFLAGS += -framework AudioToolbox
override LDFLAGS += -framework CFNetwork
override LDFLAGS += -framework CoreLocation
override LDFLAGS += -framework MediaPlayer
override LDFLAGS += -framework QuartzCore
override LDFLAGS += -framework SystemConfiguration
override LDFLAGS += -framework MobileCoreServices
override LDFLAGS += -framework AddressBook
override LDFLAGS += -framework CoreGraphics
override LDFLAGS += -framework AVFoundation
override LDFLAGS += -framework CoreMedia
override LDFLAGS += -framework PhoneGap

make 过程在链接阶段失败,并出现以下错误: http://pastebin.com/RfkZ1hdm。但是,当我评论 override LDFLAGS += -framework PhoneGap 行时,链接正常。

通过谷歌搜索,我发现缺少的符号来自基金会框架。这使得情况变得更加奇怪,因为这些符号应该作为 SDK 的一部分提供。

任何有关该主题的想法将不胜感激。

Hello again to the Stack Overflow community! I would very much appreciate your help on this matter.

Recently I compiled and installed the iOS toolchain on CentOS 6.2 i386 running inside VirtualBox on Windows 7 Home Premium x64. The test HelloWorld app builds and runs alright, but the linker gives a warning: ld: warning: -force_cpusubtype_ALL will become unsupported for ARM architectures.

Then, I downloaded PhoneGap from http://phonegap.com, extracted the iOS framework and put it in /usr/arm-apple-darwin10/System/Library/Frameworks/PhoneGap.framework. Afterwards, I modified the HelloWorld Makefile to include the following lines (required frameworks for PhoneGap):

override LDFLAGS += -lobjc
override LDFLAGS += -framework UIKit
override LDFLAGS += -framework Foundation
override LDFLAGS += -framework CoreFoundation
override LDFLAGS += -framework AddressBookUI
override LDFLAGS += -framework AudioToolbox
override LDFLAGS += -framework CFNetwork
override LDFLAGS += -framework CoreLocation
override LDFLAGS += -framework MediaPlayer
override LDFLAGS += -framework QuartzCore
override LDFLAGS += -framework SystemConfiguration
override LDFLAGS += -framework MobileCoreServices
override LDFLAGS += -framework AddressBook
override LDFLAGS += -framework CoreGraphics
override LDFLAGS += -framework AVFoundation
override LDFLAGS += -framework CoreMedia
override LDFLAGS += -framework PhoneGap

The make process fails at the linking phase with the following errors: http://pastebin.com/RfkZ1hdm. However, when I commented the override LDFLAGS += -framework PhoneGap line, the linking went fine.

From my googling I found out that the missing symbols are from the Foundation framework. This makes the situation even weirder, since these symbols should be available as part of the SDK.

Any thoughts on the topic will be very much appreciated.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文