架构i386的未定义符号"_OBJC_CLASS _ $ _ Appirater"

Cri*_*tiC 10 xcode compiler-errors objective-c

将Appirater添加到我的iOS项目后,当我编译时,我收到错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_Appirater", referenced from:
      objc-class-ref 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)
Run Code Online (Sandbox Code Playgroud)

在互联网上搜索和搜索后,找不到任何解决方案.

我的项目和目标都设置为:

在此输入图像描述

我该怎么做?

Tom*_*iak 44

我认为,你只是将文件添加到项目中,而不是目标.
点击Appirater.m文件Project Navigator和设置复选框接近你的目标名称Target membershipFile Inspector.

  • 万一有人不知道文件检查器是什么/哪里,在xcode 4和3中(如果我没记错的话)你可以去查看 - >实用程序 - >显示文件检查器.它应该从右侧滚动. (4认同)