如何确定 Mac OS X 上静态库 (.a) 的目标架构? [英] How do I determine the target architecture of static library (.a) on Mac OS X?

查看:20
本文介绍了如何确定 Mac OS X 上静态库 (.a) 的目标架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣验证是否为 ARM 或 Intel 构建了给定的 iPhone 静态库.

I'm interested in verifying if a given iPhone static library has been built for ARM or Intel.

好奇心胜过一切.是否有某种 Mac OS X 或 BSD 特定工具来执行此操作?这个 post 给出了一个例子Linux.

It's more curiosity than anything. Is there some kind of Mac OS X or BSD specific tool to do this? This post gives an example in Linux.

推荐答案

另一个选项是 lipo;它的输出比 otool 的输出更简短、更易读.

Another option is lipo; its output is brief and more readable than otool's.

一个例子:

% lipo -info /usr/lib/libiodbc.a 
Architectures in the fat file: /usr/lib/libiodbc.a are: x86_64 i386 ppc
% lipo -info libnonfatarchive.a
input file libnonfatarchive.a is not a fat file
Non-fat file: libnonfatarchive.a is architecture: i386
%

这篇关于如何确定 Mac OS X 上静态库 (.a) 的目标架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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