Loading .dylib problem
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