views:

44

answers:

1

I created a .a lib file and it was built under iPhone OS 3.0 (in XCode 3.2.2). Now I found that it doesn't work on OS 4. I was using the lipo command to build the .a file for both simulator version and device version:

lipo -create libdevice.a libsimulator.a -output libcombined.a

Now I created another .a file under iPhone OS 4.0 (in XCode 3.2.3). My question is that is it possible to combine the two lib files together? (libcombined3.a and libcombined4.a)

A: 

the 4.0 version will work on 3.0, you don't need the 3.0 specific version anymore. Move completely over to iOS4.

Joshua Weinberg
Are u sure? I use the os4.a for 3.0 specific project and get dozens of reference error.
iPhoney
Yes, just update the code to compile against 4.0, set its base SDK to 4, and its deploy target to 3.0 or whatnot. Of course test it on device to make sure it still works.
Joshua Weinberg
Thx. And one more question: I find that the os4combined version(built with os4device.a os4simu.a) doesn't work for os3 simulator (works fine on the device).
iPhoney
what OS3 simulator? 3.2?
Joshua Weinberg
I mean simulator 3.0 to 3.1.3, exclude 3.2
iPhoney
what "doesn't work"?
Joshua Weinberg
I created a .a lib which combines the lib for both the os4 device and the os4 simulator. When I add it to a project in os3 simulator mode and build the whole app, a reference error will be reported.
iPhoney
This doesn't matter much, though.
iPhoney