当我在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)
答案 0 :(得分:2)
您忘记将实现类MyDatabase
的源文件添加到Xcode目标,因此它尚未编译并与二进制文件链接。