LipoCompile and mergeIPhone SimulatorUniversal with zhenjiStatic class libraryThis document describes how to create static links in static class libraries for ios.LibraryNow the problem is that after compilation, we will use the. a file of two versionsSimulatorAndIPhoneReal machine, because Mac andIPhoneThis is the case only when the CPU is different. It is a bit like PowerMac and InterMac.
In useStatic class libraryIf we wantSimulatorFor debugging, you must useSimulatorThe lib version is added to the project. Similarly, if you want to runIPhoneWe must add the real machine lib to the project to ensure that both platforms can run, but the problem is that we always have a classLibraryNo. during compilation in Xcode 3.2 of Snow Leopard, a warning is displayed: *** is not required ***. a. xcode 3.1 also occasionally appears, but the rule is not summarized.
OK, let's solve this problem!
Assume that the two versions of lib are libIMIUI. s. a and libIMIUI. d. a. Our goal is to merge them into the invincible super general version of libIMIUI..
Open the command line Terminal. app and enter:
- lipo -create
Then drag the two. a files to the terminal window in sequence, and the command line will become like this:
- lipo -create /Users/Travis/Desktop/libIMIUI.d.a /Users/Travis/Desktop/libIMIUI.s.a
Then enter the path of the-output target file, for example:
- -output /Users/Travis/Desktop/libIMIUI.a
The following command is used:
- lipo -create /Users/Travis/Desktop/libIMIUI.d.a /Users/Travis/Desktop/libIMIUI.s.a -output /Users/Travis/Desktop/libIMIUI.a
Enter! Okay, this will generate the generic class library libIMIUI..
Summary:LipoCompile and mergeIPhone SimulatorUniversal with zhenjiStatic class libraryI hope this article will help you.