在 Xcode 中添加框架
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/379781/
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
Adding a framework in Xcode
提问by Gromski
Im trying to add a third party framework in Xcode but I'm getting an error that it can't be found
我试图在 Xcode 中添加第三方框架,但我收到一个找不到它的错误
error: MKAbeFook/MKAbeFook.h: No Such File or Directory
错误:MKAbeFook/MKAbeFook.h:没有这样的文件或目录
I've added it in the Linked Frameworks group and added it to the Target for this project. I've also added it to a new Copy Files build phase for that target.
我已将其添加到 Linked Frameworks 组中,并将其添加到此项目的 Target。我还将它添加到该目标的新复制文件构建阶段。
Basically I've followed the instructions here: http://pointlesscrap.net/mkabefook/desktop/gettingstarted
基本上我已经按照这里的说明进行操作:http: //pointlesscrap.net/mkabefook/desktop/gettingstarted
Any ideas where I'm going wrong?
任何想法我哪里出错了?
回答by
Best way to diagnose this is to post the compiler invocation line, not just the error (you can just drag and drop the line from the Build Results window that says "Compiling foo.m"). My expectation is that you don't have a Frameworks Search Path set up for the location of the framework. Xcode usually adds that manually when you add the framework, but if you put it in certain kinds of places, or added it in certain ways, you need to manually point your target's Framework Search Paths at its directory.
诊断此问题的最佳方法是发布编译器调用行,而不仅仅是错误(您只需从“构建结果”窗口中拖放显示“正在编译 foo.m”的行)。我的期望是您没有为框架的位置设置框架搜索路径。Xcode 通常会在您添加框架时手动添加,但是如果您将其放在特定类型的位置,或以特定方式添加,您需要手动将目标的框架搜索路径指向其目录。
回答by titaniumdecoy
Perhaps the author mistook MKFaceBook for MKAbeFook?
也许作者将 MKFaceBook 误认为是 MKAbeFook?
EDIT: Never mind, it looks like that is actully the name of the framework.
编辑:没关系,看起来这实际上是框架的名称。