如何结合目标文件(.o),以适用于iOS创建静态库(.a)中? [英] How to combine object files (.o) to create static library (.a) for iOS?

查看:115
本文介绍了如何结合目标文件(.o),以适用于iOS创建静态库(.a)中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编一个图书馆和有目标文件(.o)。现在我想使用AR静态库它们结合起来。我能做到这一点,但是当我补充说,文件中的iOS项目它说该库存档类型,同时连接架构是ARM7。我该如何解决这个问题?

I have compiled a library and there are object files(.o). Now I want to combine them in a static library using ar. I am able to do that but when I add that file in iOS project it says the library is archive type while linking architecture is arm7. How do I get around this?

解决

AR -crs libstatic.a *的.o
previously我用的是从iOS版SDK中的AR,我想这就是为什么它是失败的。

ar -crs libstatic.a *.o Previously I was using the ar from iOS SDK and I guess thats why it was failing.

推荐答案

迄今为止最好的资源我在题目中是在这里:

The best resource by far I have found on the topic is here:

http://sgleadow.github.com/blog/2011/10/28/universal-static-libraries-and-frameworks-for-ios/

这是一个漫长的过程 - 但每一步是必不可少的得到这个达到预期效果。

This is a lengthy process - but every step is essential to get this to work as expected.

这篇关于如何结合目标文件(.o),以适用于iOS创建静态库(.a)中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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