Go Back   The macosxhints Forums > Working with OS X > OS X Developer



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-04-2012, 10:29 AM   #1
Cactus Dan
Prospect
 
Join Date: Jun 2011
Posts: 3
usr/lib/xxxxx.dylb files?

Howdy,

My question is about linking to .dylib files from the directory:
Developer/SDKs/MacOSX10.x.sdk/usr/lib/xxxxx.dylib

... will the compiled application automatically search the hidden directory:
usr/lib/xxxxx.dylib
...on machines that don't have the developer tools installed?

Adios,
Cactus Dan
Cactus Dan is offline   Reply With Quote
Old 06-05-2012, 08:24 AM   #2
acme.mail.order
League Commissioner
 
Join Date: Sep 2003
Location: Tokyo
Posts: 6,045
I would assume yes, as it would be rather pointless the other way. (I suspect the compiler chroots itself to the relevant SDK)

Test it yourself - build something simple and run it on an OS without Dev Tools.
acme.mail.order is offline   Reply With Quote
Old 06-05-2012, 02:42 PM   #3
Cactus Dan
Prospect
 
Join Date: Jun 2011
Posts: 3
Howdy,

Thanks for the reply, however, I have 4 machines and the developer tools are installed on all 4.

But anyway, I found my answer here:
http://cocoadev.com/wiki/ApplicationLinking

... where it says:
Quote:
You can get a library's install name by using the otool -D command. Let's look at Cocoa:

$ otool -D /System/Library/Frameworks/Cocoa.framework/Cocoa
/System/Library/Frameworks/Cocoa.framework/Cocoa:
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa

The first line of the output is the file we're actually inspecting, and the second name is the install path. They're different because I actually looked at a symbolic link to the binary, not the binary itself.

... so I used the "otool -D" command with the directory path to the library in the SDK folder, and the second line of the output was the library in the hidden folder.

Adios,
Cactus Dan
Cactus Dan is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:03 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.