Re: Linker can't find library in /usr/lib when SDKROOT is set
Re: Linker can't find library in /usr/lib when SDKROOT is set
- Subject: Re: Linker can't find library in /usr/lib when SDKROOT is set
- From: Alastair Houghton <email@hidden>
- Date: Fri, 27 Nov 2009 09:22:02 +0000
On 27 Nov 2009, at 05:59, Ken Thomases wrote:
> Beyond that, it doesn't really make sense to compile against a third-party library that you're not shipping with your app while at the same time specifying an SDK. Specifying an SDK is for compatibility, but linking against an external third-party library makes your program non-portable. If you're going to tie your program to the specific libraries you have installed on your development system, then it might as well be tied to the specific libraries installed on your system (in /usr/lib and /System/Library, rather than the stubs in an SDK).
Put another way, you ideally shouldn't be installing things in /usr/local on your end users' machines. It creates a few issues, namely:
- You don't know if anyone else is using the same library
- If they are using it, you don't know what build settings they used for their version (might be incompatible with yours, even with the same version number)
- You can't delete the library on uninstallation because you don't know if it's being used by something else
If you're relying on a third-party library, it may be better to rebuild it with a more appropriate install location (e.g. inside your application bundle or framework using @rpath or @executable_path), or if you only have a binary, to use install_name_tool on it.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden