Building static libs for iPhone armv6 / armv7

So I’m attempting to switch from building my SDL 1.3 game for the iPhone simulator to testing on the actual device.

First thing I learned: I must rebuild all static libs used for armv6 / armv7. I have quite a few support libs (SDL, SDL_Image, SDL_Mixer, ZZipLib, zlib, FTGL, etc.)

I was curious how others have handled this. Do you:

A) Build each static library for both i386, armv6, and armv7 and lipo the three together?
B) Keep them separate, and just add them all to your xcode project?
C) Some other solution?

Also, is it necessary to build each static library for both armv6 AND armv7? Or could you build for just one (like armv6) and this will run on both?

If I’m right, you need to build 3: one for armv6, one for armv7, and one for the simulator. Given how many support libs I have, that’s a fair amount of static libraries!

VernJensen wrote:

So I’m attempting to switch from building my SDL 1.3 game for the iPhone simulator to testing on the actual device.

First thing I learned: I must rebuild all static libs used for armv6 / armv7. I have quite a few support libs (SDL, SDL_Image, SDL_Mixer, ZZipLib, zlib, FTGL, etc.)

I was curious how others have handled this. Do you:

A) Build each static library for both i386, armv6, and armv7 and lipo the three together?
B) Keep them separate, and just add them all to your xcode project?
C) Some other solution?

Also, is it necessary to build each static library for both armv6 AND armv7? Or could you build for just one (like armv6) and this will run on both?

If I’m right, you need to build 3: one for armv6, one for armv7, and one for the simulator. Given how many support libs I have, that’s a fair amount of static libraries!

I’ll tell you this – when I went from simulator to actual device, I never looked back. I only compile my libs from the device now (and modern ones) so I never compile more than armv7. The reason is I never got good performance on the simulator, even though my mac, while older, is very powerful.

If you have heavy OpenGL usage, I say skip the simulator and run on the device only. It’s another difference that you won’t want to waste the time on the simulator. For regular UI applications, the simulator is great, but I find it pretty useless otherwise.

I think you can compile 6/7 together without using lipo. It’s the simulator version that’s always the trouble.

[>] Brian

I use the attached script for building freetype. I hardly ever use the
simulator so it doesn’t build for that.

For SDL I build it as a subproject of the main project. Just drag it
from Finder into the space below your main project. This seems to “just
work” for some values of just work, so I imagine if you have an Xcode
project for the libraries you’re trying to build, this is probably the
best way to go.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: build-for-ios.sh
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20120127/de20c02a/attachment.txtOn 26/01/2012 21:58, VernJensen wrote:

If I’m right, you need to build 3: one for armv6, one for armv7, and one
for the simulator. Given how many support libs I have, that’s a fair
amount of static libraries!