在 iOS 工具链上链接 PhoneGap 框架
再次向 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论