Combine static libraries on Apple(在 Apple 上合并静态库)
问题描述
我尝试了这个问题中的方法, 但是 ar
的 linux 版本似乎与 mac 版本不一样,因为我未能再次合并目标文件.
I tried the approach in this question, but it seems the linux version of ar
is not the same as the mac version since I failed to combine the object files again.
我基本上想做的是通过运行脚本构建阶段将另一个静态库合并到我的 Xcode 静态库构建产品中.
What I basically want to do is is merge another static library into my Xcode static library build product via a run-script build phase.
很遗憾,我无法将其他库直接编译到我的项目中,因为它有自己的构建系统(因此我使用编译后的库).
Unfortunately I can't compile the other library directly into my project because it has it's own build system (therefore I use the compiled libs).
我认为应该可以通过 ar
将其他库合并到 Xcode 生成的库中,而无需反编译构建产品.我该如何做到这一点?
I think it should be possible to merge the other library via ar
into the Xcode generated library without decompiling the build product. How do I accomplish this?
推荐答案
你可以使用libtool
来做
libtool -static -o new.a old1.a old2.a
这篇关于在 Apple 上合并静态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Apple 上合并静态库


基础教程推荐
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01