在Xcode中编译时链接器错误

时间:2013-02-28 08:21:37

标签: xcode linker linker-errors

当我在Xcode中编译程序时,我收到此错误。

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

1 个答案:

答案 0 :(得分:2)

您忘记将实现类MyDatabase的源文件添加到Xcode目标,因此它尚未编译并与二进制文件链接。