Linking PhoneGap Framework on the iOS Toolchain

2012-01-31T04:53:13

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.

Copyright License:
Author:「Michael Bikovitsky」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/9070625/linking-phonegap-framework-on-the-ios-toolchain

About “Linking PhoneGap Framework on the iOS Toolchain” questions

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.