dyld: Library not loaded: & embedded app resources

Christiaan Hofman cmhofman at gmail.com
Fri Sep 21 02:27:20 PDT 2007


If you build the framework from source, the best way is to add a  
subproject for it in your main project file (drag the xcode project  
for the framework to the groups of the main project). Then add the  
framework as a dependency to the main project target. Then drag the  
product framework from inside the linked xcode project  group to the  
Linked Frameworks group in the main project. Next you need to drag  
the framework to a Copy Files build phase and (I think) to the Link  
Binary With Libraries build phase. There are several "copies" of the  
framework in your main project, and it is important which one you  
drag there, though I'm not 100% sure which one it is, I think it's  
the one from the linked xcode project (definitely not from Finder).  
The Get Info panel does not show a difference, but internally there  
is a difference.

Christiaan

On 21 Sep 2007, at 11:03 AM, Anthony B Arthur wrote:

> hmm, no I did not tamper with this part of the project.  It is  
> unclear, from the info panel,  what path these are linked to and  
> how to change that.  So far, all I've done is delete the relevant  
> frameworks from the linked frameworks group (because I copied the  
> source from another host, so the resource names were red), and re- 
> added each one after compiling them locally, but the app still  
> wants to load them from /Library/Frameworks.  Short of recreating  
> the project from scratch, surely there is a configuration setting  
> in xCode to stop that.
>
> Also, to clarify my question a bit, I suppose that the command  
> install_name_tool can be used to operate on the app binary and fix  
> this, but then I have the same problem again the next time I compile.
>
> Any help is appreciated.
>
> --Brian
>
> On Sep 21, 2007, at 4:41 AM, Christiaan Hofman wrote:
>
>> Did you link to the correct copy of the library in the Link Binary  
>> With Libraries build phase?
>>
>> Christiaan
>>
>> On 21 Sep 2007, at 10:25 AM, Anthony B Arthur wrote:
>>
>>> How do I stop my app from looking in /Library/Frameworks for  
>>> third party frameworks?  These frameworks were originally added  
>>> to the project from that path, but now I want the app to load  
>>> them from within the app bundle.  I have followed all the steps  
>>> to prepare my frameworks to be embedded (http://rentzsch.com/ 
>>> share/embeddingFrameworks.mov), created a copy file rule for  
>>> them, but the app still wants to load them from /Library/Frameworks.
>>>
>>> dyld: Library not loaded: /Library/Frameworks/EKFormKit.framework/ 
>>> Versions/A/EKFormKit
>>> <blah>
>>> Reason: image not found
>>>
>>> How can I persuade the app to stop looking there for resources?
>>>
>>> Thanks,
>>>
>>> --Brian
>>> _______________________________________________
>>> MacOSX-dev mailing list
>>> MacOSX-dev at omnigroup.com
>>> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>



More information about the MacOSX-dev mailing list