• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to link against a framework that includes other dynamic libararies?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >how to link against a framework that includes other dynamic libararies? (From: Dennis Christopher <email@hidden>)

  • Prev by Date: Re: How Do Solve This Warning?
  • Next by Date: file is not of required architecture
  • Previous by thread: how to link against a framework that includes other dynamic libararies?
  • Next by thread: How Do Solve This Warning?
  • Index(es):
    • Date
    • Thread