Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: info needed????????



I always cringe when I see something like this posted by someone who sounds like they have the answers. DO NOT DO THIS!!!

It is almost ALWAYS a VERY BAD IDEA to put arbitrary libraries in /usr/lib.

If you know what you are doing, and are only doing for pure ease and are very careful and aware of possible name conflicts and what files might link to that lib, etc, then it is EASIER to do it the right way! If not, then you are begging for huge trouble. Do not do this. Do not ever just drop a file into anywhere in /usr, (except /usr/local/{bin,sbin,lib,include,&c}, which is for just this purpose).


On 8 Dec 2004, at 02:45, Sherm Pendley wrote:
If the filename alone is used, you can simply install the library in one of the standard locations - /usr/lib, for example.



When you build your library, give it a full path, or a relative path, using the -install_name option, or "install path" setting in Xcode, just as mr Pendley mentioned. A full path might be "/usr/local/lib/libtest.dylib", or a relative path would be "@executable_path/../Frameworks/libtest.dylib". Note that if you use either of these, you must put libtest.dylib in that position. The relative path means that you have an application bundle named Cookie.app, Inside that is Cookie.app/Contents/MacOS/Cookie (your executable). libtest.dylib should be in Cookie.app/Contents/Frameworks/libtest.dylib. ok?


If you want the simplicity of not using the install name, then you can place libtest.dylib inside Cookie.app/Contents/MacOS. This way it will link, however be aware that this is a bad habbit and should not be done in a production package.

JP



--
Blood is thicker than water... and much tastier.



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden

References: 
 >RE: info needed???????? (From: Hemanta Pathak <email@hidden>)
 >Re: info needed???????? (From: Sherm Pendley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.