• 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
Loading .dylib problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Loading .dylib problem


  • Subject: Loading .dylib problem
  • From: Graham Cox <email@hidden>
  • Date: Thu, 02 Jul 2015 12:55:57 +1000

Hi all,

I’m developing an app that includes a .dylib within its own resources. For convenience I’m locating this in the /Frameworks subdirectory. I added a File Copy to the Build Phases to copy the library there, and I confirm it’s being done in both debug and release builds. I also added the @executable_path/../Frameworks search path in the Runpath Search Paths build setting.

This was working fine until just now. Suddenly, it’s throwing a runtime error:

dyld: Library not loaded: /usr/local/lib/MyLib.dylib
  Referenced from: /Users/grahamcox/Library/Developer/Xcode/DerivedData/Graphplot-bmgxcdcnhapazbfdwmjklsckwjon/Build/Products/Debug/Graphplot.app/Contents/MacOS/Graphplot
  Reason: image not found

 This suggests it’s searching in /usr/local/lib/ for the library, not the /Frameworks relative path.

I’ve tried reopening the project, relaunching Xcode, but it’s firmly stuck doing this. The build settings all seem fine.

Any ideas?

—Graham



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Loading .dylib problem
      • From: Greg Parker <email@hidden>
  • Prev by Date: Re: Swift and parameter names
  • Next by Date: Re: Loading .dylib problem
  • Previous by thread: Re: Swift 2 throws from init()
  • Next by thread: Re: Loading .dylib problem
  • Index(es):
    • Date
    • Thread