logan:/Users/logan% file /usr/lib/libMallocDebug.a
/usr/lib/libMallocDebug.a:Mach-O universal binary with2 architectures
/usr/lib/libMallocDebug.a (for architecture i386): current ar archive random library
/usr/lib/libMallocDebug.a (for architecture ppc): current ar archive
Another option is lipo,
it's output is brief and more readable that otool's.
% lipo -info /usr/lib/libiodbc.a
Architecturesin the fat file:/usr/lib/libiodbc.a are: x86_64 i386 ppc
% lipo -info libnonfatarchive.a
input file libnonfatarchive.a isnot a fat file
Non-fat file: libnonfatarchive.a is architecture: i386
As mentioned earlier, file does
not always work. otool
-hv is probably the closest thing that is guaranteed to work - it gives architecture information for every single object file in the library.