[OS X TeX] OT: getting library version

Martin Costabel costabel at wanadoo.fr
Sat May 31 07:07:02 EDT 2008

Bruno Voisin wrote:
>> All this because I was trying to get a picture of the libpngs in 
>> /usr/X11 and /usr/local. I imagine Apple's 10.5.3 security update 
>> places version 1.2.24 in /usr/X11 and i-Installer places version 
>> 1.2.29 in /usr/local, and I was trying to double-check.

The compatibility_version of a dylib (which you read with otool -L) s 
only loosely related to the release version number of the software that 
contains the dylib. In the case of libpng12.dylib, the latter happens to 
be stored in the body of the dylib, and you can see it with the 
"strings" command:

  strings /usr/X11/lib/libpng12.dylib | grep version

For an executable statically linked to a library, I don't think there is 
a systematic way to find the version of that library.


More information about the MacOSX-TeX mailing list