简体   繁体   English

构建失败错误:未定义的符号

[英]Build Failed Error: Undefined Symbols

I am getting this error when I try to build my project.当我尝试构建我的项目时出现此错误。

Undefined symbols for architecture i386:
  "_OBJC_IVAR_$_UINavigationBar.images", referenced from:
      -[UINavigationBar(CustomImage) drawRect:] in AppDelegate.o
      -[UINavigationBar(CustomImage) setImagesNames:] in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Anyone can help?任何人都可以帮忙吗?

Go to your AppDelegate class and check the include for your UINavigationBar category. Go 到您的 AppDelegate class 并检查您的 UINavigationBar 类别的包含。 Your category is either missing from the project, or it is private.您的类别从项目中丢失,或者它是私有的。 My best guess is that it's missing or when you created it you didn't check the target checkbox.我最好的猜测是它丢失了,或者当你创建它时你没有选中目标复选框。 They removing it and re-add it.他们删除它并重新添加它。 Be careful when you add it back to have your active target checked for the file.将其重新添加以检查活动目标的文件时要小心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM