21

我成功地在我的新项目中安装和使用 Parse 框架,但我不能使用“模板项目”。

该模板只是Appcoda幻灯片菜单

您可以在此处下载该项目。我有这个错误:

ld: framework not found Parse
clang: error: linker command failed with exit code 1 (use -v to see invocation)

螺栓也是如此。

我不明白问题是什么,最初的项目只是一些视图控制器......

当我编写代码“import Parse”时,错误消息是:

No such module 'Parse'

我尝试拖放框架,并在“Link Binary With Libraries”中添加框架。

PS:我使用的是 Xcode 7 beta,我尝试了 beta 1 和 2,同样的问题。

4

6 回答 6

66

这是解决方案:

Xcode 7 beta 似乎存在一个问题,其中缺少手动添加框架的搜索路径。

要解决此问题,请执行以下操作添加搜索路径:

  1. 选择项目
  2. 点击目标
  3. 单击构建设置
  4. 搜索:Framework Search Path
  5. 添加$(PROJECT_DIR)并选择递归选项。

该项目现在应该构建。

感谢这篇文章:链接到堆栈

于 2015-07-08T16:17:41.947 回答
7

建议的解决方案都不适合我。最终我发现解决方案是从名称中没有空格的源文件夹中拖动框架。

例如

  • 从“iOS SDKS”中拖动框架 > 不起作用
  • 从“下载”> 工作中拖动框架

在使用包含空格的路径时,XCode 已经不是第一次出现问题了。

于 2015-12-22T23:09:05.273 回答
4

确保 Parse 包含在“Build Phases”下的“Link Binary With Libraries”部分中。

于 2015-07-08T14:51:20.963 回答
0

This can also happen if you accidentally break your framework, e.g. if the framework contained an Alias, which is no longer there.

This can happen if you zip the file, as the Alias contains a direct link to the orignal file, and isnt updated when you move the zip. E.g. in my case I recieved a zip of the opencv framework, and inside it had just the 'Versions' folder and no aliases to Headers, Resources or the binary. You can just recreate the aliases, or compile the framework from source again.

This took a while to figure out!

于 2021-11-16T09:45:40.327 回答
0

即使我遇到了同样的问题。就我而言,不知何故,项目中添加了多个框架,其中一个框架是空的。删除空框架后,它开始编译。

于 2020-10-06T11:13:06.957 回答
0

转到您的 Build Phases -> Linked Binary With Libraries 删除您的 pod 框架并重新添加它。这就是诀窍。

于 2019-09-19T01:37:46.620 回答