1

Mac に静的ライブラリがあり、そのライブラリが armV7s アーキテクチャ用に構築されているかどうか知りたいですか? このライブラリでサポートされているアーキテクチャを表示するために利用できるコマンド/ツールはありますか?

ありがとう、カムラン

4

3 に答える 3

4
your-mac:~ yourlogin$ file /Path/to/somebinary

/Path/to/somebinary: Mach-O universal binary with 3 architectures
/Path/to/somebinary (for architecture x86_64):    Mach-O 64-bit executable x86_64
/Path/to/somebinary (for architecture i386):      Mach-O executable i386
/Path/to/somebinary (for architecture ppc7400):   Mach-O executable ppc
于 2012-09-21T20:26:09.370 に答える
4

その情報を取得するには、otool を使用できます。

otoolのマンページから

-L オブジェクトファイルが使用する共有ライブラリの名前とバージョン番号を表示します。ファイルが共有ライブラリの場合は、共有ライブラリ ID と同様。

> 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):
于 2012-09-21T20:31:49.103 に答える
2

他の回答に異論はありませんが、もう 1 つのオプションがありますlipo。コマンドを使用します。

lipo の Apple man ページ

lipo -info実行可能ファイルまたはライブラリで実行できます。いくつかの例:

minime:arc username$ lipo -info libarclite_iphonesimulator.a
input file libarclite_iphonesimulator.a is not a fat file
Non-fat file: libarclite_iphonesimulator.a is architecture: i386

minime:iPhone username$ cd HelloWorld.app/
minime:HelloWorld.app username$ lipo -info HelloWorld
Non-fat file: HelloWorld is architecture: armv7
于 2012-09-21T20:41:27.080 に答える