开发者

dyld not loaded problem xcode 4

I dragged skype fromwork into my frameworks folder and then imported <Skype/Skype.h>. When I run, it gives me this error:

dyld: Library not loaded: @executable_path/..开发者_如何学C/Frameworks/Skype.framework/Versions/A/Skype
  Referenced from: /Users/test/Library/Developer/Xcode/DerivedData/TEST-edktdfqvxhqmfpfqrdqrmjojnfly/Build/Products/Debug/TEST.app/Contents/MacOS/TEST
  Reason: image not found


Try setting the "Library Search Path" build settings for your project.

In Xcode 4.x:

You need to drag the .framework from the Project navigator to the Copy Files build phase.

In Xcode 3.2.x:

  1. Choose Project > New Build Phase > New Copy Files Build Phase

  2. In the Destination drop down box select Frameworks

  3. Close the Copy Files Phase Info window to return to the Xcode main window

  4. In the Groups & Files pane expand Targets > YourApplicationExectuable, where you should now see a Copy Files entry

  5. Still in Groups & Files pane drag your framework into the Copy Files entry

  6. Recompile

If you don't do this, the framework will not be actually copied into your application bundle, so it will not be found when your app tries loading it into memory.


Just as a side note, I spent months trying to track down an answer to this problem, always seeing this answer but never being able to get it to work.

MY MISTAKE: The "Copy Files" build phase is not shown by default. I was seeing the "Copy Bundle Resources" phase and wrongly assuming that was where I needed to list the framework.

At the bottom of the Build Phases pane click on Add Build Phase. "Copy Files" is listed there.


Doesn't work for me. I had to make a link to the framework in the ~/Library/Developer/..../Debug/../Frameworks for it to work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜