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

查看:282
本文介绍了如何在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特定工具来执行此操作?这个发布给出了一个例子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天全站免登陆