开发者

Determine if an executable (or library) is 32 or 64 bit

开发者 https://www.devze.com 2022-12-14 09:18 出处:网络
Is it possible to get information about any binary on OS X to determine if it\'s a 32 bit or 64 bit binary?

Is it possible to get information about any binary on OS X to determine if it's a 32 bit or 64 bit binary?

I played with the 'otool' c开发者_C百科ommand but can't find this kind of information.


Use the file command instead of otool. It will list all the architectures in the binary. On Intel Macs i386 is 32 bit and x86_64 is 64 bit.


From Nicholas in a comment, lipo -info also works. This is what you must use on static libraries, since file only displays "current ar archive random library."

0

精彩评论

暂无评论...
验证码 换一张
取 消