简体   繁体   English

Xcode 4.3.3-错误未定义符号

[英]Xcode 4.3.3 - Error Undefined Symbols

hy all, I am building an application to create a simple tableview, with a search bar on top to search between the elements of the table. 总体而言,我正在构建一个应用程序以创建一个简单的表视图,并在顶部具有一个搜索栏,以在表的元素之间进行搜索。 I have followed a tutorial and no coding errors were found, but when building, it always fails showing the following message: 我遵循了一个教程,没有发现任何编码错误,但是在构建时,它始终无法显示以下消息:

Ld /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator/ERCDictionnary.app/ERCDictionnary normal i386
cd /Users/gouyoun/Desktop/ERCDictionnary/ERCDictionnary
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Volumes/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator -F/Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator -filelist /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Intermediates/ERCDictionnary.build/Debug-iphonesimulator/ERCDictionnary.build/Objects-normal/i386/ERCDictionnary.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/gouyoun/Library/Developer/Xcode/DerivedData/ERCDictionnary-atjolczeormaykcscwvnhlxdcnvk/Build/Products/Debug-iphonesimulator/ERCDictionnary.app/ERCDictionnary

Undefined symbols for architecture i386: "_OBJC_CLASS_$_OverlayViewController", referenced from: objc-class-ref in tableView.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) 架构i386的未定义符号:“ _ OBJC_CLASS _ $ _ OverlayViewController”,引用自:tableView.o中的objc-class-ref ld:架构i386找不到clang符号:错误:链接器命令失败,退出代码为1(使用-v查看调用)

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

I'm a newb in OBjective C, any ideas? 我是对象C的新手,有什么想法吗?

您的tableView类引用了一个不在项目中的名为OverlayViewController的类。

完成后,只需删除文件并稍后重新添加它们,就可以像魅力一样工作

I've had the exact same error. 我有完全相同的错误。 It occured because I had 2 xCode Projects open, an Dragged & Dropped a class from one project to the other one. 这是因为我打开了2个xCode项目,一个从一个项目拖放到另一个项目的类。 I checked "Copy to project" and the files where in the new projects folder. 我检查了“复制到项目”以及新项目文件夹中的文件。 But it crashed every time. 但是它每次都崩溃了。

I deleted the classes and IMPORTED them into the project and then it worked... So be careful when using Drag'n'Drop! 我删除了类和它们导入的项目,然后它的工作...所以使用时中拖放要小心!

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

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