Creating an iPhone static library for armv6 and armv7, which includes another static library

I have an Xcode project that has a “main” static library target that includes / links to a bunch of other static libraries from other Xcode projects.

When creating the target of the main library for "Optimized (armv6 armv7)", an error occurs at the last stage during the CreateUniversalBinary step. For each .o library file that is included in the main library, the following error is reported (for example, the FBConnectGlobal.o file):

warning for architecture: armv6 same member name (FBConnectGlobal.o) 
in output file used for input files: /Developer_Beta/Builds/MTToolbox/MTToolbox.build/Debug-iphoneos/MTToolbox.build/Objects-normal/armv6/libMTToolbox.a(FBConnectGlobal.o) 
and: /Developer_Beta/Builds/MTToolbox/MTToolbox.build/Debug-iphoneos/MTToolbox.build/Objects-normal/armv7/libMTToolbox.a(FBConnectGlobal.o) 
due to use of basename, truncation and blank padding

In the end, Xcode reports that the build was successful. However, when using the final static library in the application project, it will not be built because it finds duplicate characters in one part of the assembly (armv6) and skips characters in another part of the assembly (armv7).

Any ideas how to fix this?

M

+5
source share
3 answers

Do not create libraries in other libraries - this is a recipe for confusion, duplication of symbol errors and hard-to-debug results. Have a look at this question: How can I avoid duplicating the error symbol in xcode with shared static libraries?

+3
source
+5

Another fix I found is to install the architecture on "armv6". ARCHS_STANDARD_32_BIT changed from armv6 to "armv6 armv7", which exacerbates the libtool error described above. Obviously, it will not create optimized armv7 binaries, but it should still work fine on iPhone 4.

+1
source

All Articles