Re: Building a Static Library for iPhone and Simulator
Re: Building a Static Library for iPhone and Simulator
- Subject: Re: Building a Static Library for iPhone and Simulator
- From: Chris Espinosa <email@hidden>
- Date: Tue, 30 Jun 2009 14:20:44 -0700
On Jun 30, 2009, at 1:54 PM, George King wrote:
I am trying to build a fat static library for armv6, armv7, and i386
so that I can include this library in iPhone applications and
successfully link for both the simulator and the device. This
strategy works when I build separate versions of the lib for each
device and simulator, then include both in the link phase of the
application. The only problem with this is that for each target
architecture, I get a warning that the other library doesn't contain
the required arch.
To solve this, I attempted to build a single static lib for all
three archs. Under the target build settings, I set:
Architectures: i386 armv6 armv7
Base SDK: iPhone Device 3.0
Valid Architectectures: i386 armv6 armv7
Build Active Architectures Only: unchecked.
When I build the library, I se no difference: the i386 architecture
gets ignored. Does anybody have any ideas on how to get this to
work? Is the base sdk limiting my choice of architectures?
Specifying the simulator sdk under additional architectures doesn't
work.
The alternative that I see is to run a script phase at the end of
the build and create the fat binary manually using lipo. I'd much
rather have Xcode do this for me if at all possible.
You probably want to ask this in the iPhone Developer Forums, http://devforums.apple.com
The main problem is that each architecture has to be built against a
different SDK, so you need per-arch Build Setting Conditions for the
Base SDK value.
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden