为armv6和armv7构建iPhone静态库,其中包含另一个静态库 [英] Building iPhone static library for armv6 and armv7 that includes another static library

查看:404
本文介绍了为armv6和armv7构建iPhone静态库,其中包含另一个静态库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Xcode项目,它有一个主静态库目标,包括/链接到其他Xcode项目中的一堆其他静态库。

I have an Xcode project that has a "master" static library target, that includes/links to a bunch of other static libraries from other Xcode projects.

为优化(armv6 armv7)构建主库目标,在CreateUniversalBinary步骤中的最后阶段发生错误。对于主库包含的库的每个.o文件,报告以下错误(例如,FBConnectGlobal.o文件):

When building the master library target for "Optimized (armv6 armv7)", an error occurs in the last phase, during the CreateUniversalBinary step. For each .o file of the libraries that is included by the master 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

最后, Xcode告诉构建成功。但是,在应用程序项目中使用最终静态库时,它不会构建,因为它在构建的一部分(armv6)中找到重复的符号,并且在构建的另一部分(armv7)中遗漏了符号。

In the end, Xcode tells that the build has succeeded. However, when using the final static library in an application project, it won't build because it finds duplicate symbols in one part of build (armv6) and misses symbols in the other part of the build (armv7).

任何想法如何解决这个问题?

Any ideas how to fix this?

M

推荐答案

不要将库构建到其他库中 - 这是一个混淆,重复符号错误和难以调试的结果的方法。
查看这个问题:如何避免重复符号?使用共享静态库的xcode中的错误?

Don't build libraries into other libraries - it's a recipe for confusion, duplicate symbol errors, and hard-to-debug results. Check out this question: How can I avoid "duplicate symbol" errors in xcode with shared static libraries?

这篇关于为armv6和armv7构建iPhone静态库,其中包含另一个静态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆