The question is,
After compilation, the. A files of two versions are used for the simulator and the iPhone, respectively. This is caused by the difference between the Mac and the iPhone CPU. It is a bit like powermac and intermac.
This article from: http:// B .imi.im /? P = 255
When using static class libraries, if we want to debug the simulator, we must add the Lib used for the Simulator version to the project. Similarly, if we want to run the lib on the iPhone, we 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 class library that is not needed, during compilation in xcode 3.2 of snow leopard, a warning is displayed: *** is unnecessary ***. 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.
Then enter the path of the-output target file, for example:
-Output/users/Travis/desktop/libimiui.
The following command is used:
Lipo-create/users/Travis/desktop/libimiui. d. A/users/Travis/desktop/libimiui. s. A-output/users/Travis/desktop/libimiui.
Enter! Okay, this will generate the generic class library libimiui..