xcode 链接器命令失败,退出代码为 1 - 不知道为什么

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10097544/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:56:40  来源:igfitidea点击:

Linker command failed with exit code 1 - not sure why

iphoneobjective-ciosxcode

提问by Andrew

I'm not sure exactly why i'm getting this. It usually comes because of a missing framework, except its mentioning a class I already have in my project, and imported into the file it's saying the error is on. It says...

我不确定为什么我会得到这个。它通常是由于缺少框架而出现的,除了它提到我在我的项目中已有的一个类,并导入到文件中,它说错误发生了。它说...

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_ELCImagePickerController", referenced from:
      objc-class-ref in JCreateViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

JCreateViewController.m had this in the imports:

JCreateViewController.m 在导入中有这个:

#import "ELCImagePickerController.h"

So i don't really know why it's giving me this error.

所以我真的不知道为什么它会给我这个错误。

Any ideas?

有任何想法吗?

回答by Matt Wilding

In the interest of providing an acceptable answer, from the comments:

为了提供可接受的答案,从评论中:

Make sure ELCImagePickerControlleris included in your project's Compile Sources build phase.

确保ELCImagePickerController包含在您项目的编译源构建阶段。

回答by amar

you can add resources to your projects build phases by simple select and add see this link

您可以通过简单的选择和添加将资源添加到您的项目构建阶段,请参阅此链接