Re: how to link against a framework that includes other dynamic libararies?
Re: how to link against a framework that includes other dynamic libararies?
- Subject: Re: how to link against a framework that includes other dynamic libararies?
- From: Chris Hanson <email@hidden>
- Date: Mon, 14 Jan 2008 11:29:01 -0800
On Jan 14, 2008, at 10:21 AM, Dennis Christopher wrote: All my projects are set to link against the 10.4 Universal SDK.
I build a framework that includes several dynamic libraries found in /opt/local/lib. The path type is absolute. When I try to link an app against this framework I get a build error saying it cannot open the dylib referred to by .... and it puts the path to the 10.4 SDK with "/opt/local/lib" appended on the end of it--which of course is not where the lib exists.
When an SDK is set, the various underlying tools used by Xcode for compilation, linking, and so on will automatically prepend the path to the SDK to any absolute paths used. That's why you're seeing the error.
One way you can address this is to add a symbolic link that points to your /opt directory in your version of the Mac OS X 10.4u SDK:
% sudo ln -s /opt /Developer/SDKs/MacOSX10.4u.sdk/opt
Another way to address this is to use /usr/local/lib instead of /opt/local/lib for system-local libraries; the SDKs included with recent versions of Xcode already contain a symbolic link to /usr/local/lib for just this reason.
-- Chris
PS - It's a good idea to always mention which version of Xcode and Mac OS X you're using, since things can change from release to release. |
_______________________________________________
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