Click here to Skip to main content
13,087,566 members (74,222 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I wanted to get the dylib version. I've a dylib path for which I wanted to get the version number.
I've tried "otool -L" command and it's giving me the proper output but as per the requirements I can't use it, since I've 100 of dylib in a directory for which I wanted to get the version information and I can't run "otool" command for each dylib through NSTask and NSPipe.

I've also found the NSVersionOfLinkTimeLibrary() function to get the dylib version, but as per the documentation NSVersionOfLinkTimeLibrary returns the version number for linked libraries and not for other dylib.

Any help on this would be helpful.

Posted 8-Feb-13 6:01am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You just want to run "otool -L" on a large number of files?

Open up a terminal window and go to the directory containing the files, then type this:

for f in *
   otool -L $f

OSX is a unix based system, and "terminal" is a unix shell that allows you to run unix scripts.

Google "Unix shell scripting" to find out more about shell scripting (also, do that if there is a problem with the syntax of my solution -- I didn't have a Unix machine to test it on).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 19 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100