Building a Static Library for iPhone and Simulator
Building a Static Library for iPhone and Simulator
- Subject: Building a Static Library for iPhone and Simulator
- From: George King <email@hidden>
- Date: Tue, 30 Jun 2009 13:54:55 -0700
Hi List,
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.
Thanks,
George
_______________________________________________
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