iOS:Unix:Mac 从静态库中提取有关受支持架构的信息。如何?

标签 ios linux macos unix static-libraries

我的 Mac 上有一个静态库,很想知道这个库是否是为 armV7s 架构构建的?是否有任何命令/工具可用于显示此库中支持的架构?

谢谢, 卡姆兰

最佳答案

您可以使用 otool 获取该信息。

来自 otool 的联机帮助页

-L Display the names and version numbers of the shared libraries that the object file uses. As well as the shared library ID if the file is a shared library.

例子

> otool -L libRaptureXML_universal.a 

Archive : libRaptureXML_universal.a (architecture armv7)
libRaptureXML_universal.a(RXMLElement.o) (architecture armv7):
Archive : libRaptureXML_universal.a (architecture i386)
libRaptureXML_universal.a(RXMLElement.o) (architecture i386):

关于iOS:Unix:Mac 从静态库中提取有关受支持架构的信息。如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12537617/

相关文章:

ios - 访问 Swift 类中的协议(protocol)属性

windows - .git 文件夹是跨平台的吗?

c - 如何隐藏Linux静态库的本地符号

macos - 基于 VLCKit 的应用程序阻止屏幕保护程序

git - 在单个主机上使用多个 key 时,SSH 使用错误的 key

c++ - Portaudio 输入缓冲区始终为空

ios - 手动居中时,UIButton 不会在 UITableViewCell 中居中

ios - 如何为 UITableView 中的 Index Bar 部分设置透明背景?

ios - 在已获得焦点的模态 VC 中显示 UISearchController

linux - Linux上的二进制grep?