How can I know which architecture an *.a file is built for?

一笑奈何 提交于 2019-12-10 17:34:47

问题


I'm working on mac OS 10.7.4. using Xcode 4.3.2 .

I had a *.a static library file from my partner. I want to know which architecture it is built for. Is it ARMv6, ARMv7, i386 or other architecture?

Is there any command or method to get info about the architecture of the file?


回答1:


You can use otool to find out the architecture(s) of a file: otool man page

otool -hv mylibrary.a



回答2:


The Unix/Linux file command will tell you what kind of file it is:

% file a.out
a.out: Mach-O 64-bit executable x86_64


来源:https://stackoverflow.com/questions/12001195/how-can-i-know-which-architecture-an-a-file-is-built-for

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!