CocoaLibSpotify-库未加载 [英] CocoaLibSpotify - Library not loaded
本文介绍了CocoaLibSpotify-库未加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了一个简单的mac应用,该应用使用可可包装器来进行libspotify.
I've created a simple mac app that uses the Cocoa wrapper for libspotify.
当我将项目导出为应用程序并尝试运行它时,它立即崩溃.
When I export the project as an Application and try to run it, it crashes immediately.
崩溃报告:
Application Specific Information:
dyld: launch, loading dependent libraries
Dyld Error Message:
Library not loaded: @rpath/CocoaLibSpotify.framework/Versions/A/CocoaLibSpotify
Referenced from: /Users/USER/Desktop/Wunderkiste.app/Contents/MacOS/Wunderkiste
Reason: image not found
otool输出:
$ otool -L ~/Desktop/Wunderkiste.app/Contents/MacOS/Wunderkiste
@rpath/CocoaLibSpotify.framework/Versions/A/CocoaLibSpotify (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1056.0.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1265.0.0)
/System/Library/Frameworks/CoreData.framework/Versions/A/CoreData (compatibility version 1.0.0, current version 481.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.11.0)
项目-构建阶段
有什么想法吗?
推荐答案
项目中的Runtime Search Paths
构建设置需要包含@loader_path/../Frameworks
,以告诉动态链接程序在运行时在哪里可以找到CocoaLibSpotify.
The Runtime Search Paths
build setting in your project needs to contain @loader_path/../Frameworks
to tell the dynamic linker where to find CocoaLibSpotify at runtime.
请参见链接并安装名字(由Mike Ash进行详细讨论).
See Linking and Install Names by Mike Ash for a detailed discussion.
这篇关于CocoaLibSpotify-库未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文