xcode 未找到框架问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6686503/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
framework not found issue
提问by Oleg
Upon building my project (a simple cocoa application) in XCode 3 I get this error message:
在 XCode 3 中构建我的项目(一个简单的可可应用程序)时,我收到此错误消息:
ld: framework not found SDL
collect2: ld returned 1 exit status
But framework exists here /Library/Frameworks/SDL.framework
. How do I get the linker to find it?
但是这里存在框架/Library/Frameworks/SDL.framework
。我如何让链接器找到它?
回答by NinjaBeetle
The solution to this for external libraries is to add your framework's path to Build Settings > Search Paths > Framework Paths.
外部库的解决方案是将您的框架路径添加到构建设置 > 搜索路径 > 框架路径。
Like this: /Users/MyMacName/Documents/FacebookSDK
像这样:/Users/MyMacName/Documents/FacebookSDK
If it is something that "came with" xcode then it should work without this addition.
如果它是“随附”xcode 的东西,那么它应该可以在没有此添加的情况下工作。
回答by Роман Зыков
If you get this error - try
如果您收到此错误 - 尝试
place YOUR.framework to folder with your project.
将 YOUR.framework 与您的项目一起放在文件夹中。
Set patch to framework in config project.
在配置项目中为框架设置补丁。
回答by AbcTest
You need to add the framework by right clicking on the on the framework in the sources and file menu and select the existing file. Add the framework after that it is visible in your project.
您需要通过右键单击源和文件菜单中的框架并选择现有文件来添加框架。之后添加框架,它在您的项目中可见。
回答by spudwaffle
You need to add the framework to your Xcode project. Literally drag the framework into the Frameworks
folder.
您需要将框架添加到您的 Xcode 项目中。直接将框架拖到Frameworks
文件夹中。