链接错误Ipad

时间:2011-04-04 21:18:23

标签: ios ipad

我正在尝试编译应用程序时遇到此错误。任何人都可以告诉我这个错误是什么?

由于

Ld /Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator/Graph_Theory.app/Graph_Theory normal i386
    cd "/Users/DineshParchuri/Desktop/3:28:11/Graph_Theory"
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk -L/Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator -F/Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator -filelist /Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Intermediates/Graph_Theory.build/Debug-iphonesimulator/Graph_Theory.build/Objects-normal/i386/Graph_Theory.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -o /Users/DineshParchuri/Library/Developer/Xcode/DerivedData/Graph_Theory-bxoahqkbiemabledhmfyzkqpotjr/Build/Products/Debug-iphonesimulator/Graph_Theory.app/Graph_Theory

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_MyTableCell", referenced from:
      objc-class-ref in Graph_TheoryViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

2 个答案:

答案 0 :(得分:1)

错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_MyTableCell", referenced from:
      objc-class-ref in Graph_TheoryViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

指定没有(完全)定义名为MyTableCell的Objective-C类,并在Graph_TheoryViewController.m中调用此未定义类

检查Graph_TheoryViewController.m文件,看看你是否实现了MyTableCell,如果你有(我假设)在其中一个包含头文件中定义了该名称的类。

如果在其他地方声明了这个类,你可能在相应的.m文件中缺少方法实现(很可能是MyTableCell.m)

答案 1 :(得分:-1)

当我尝试将GData XML包含到我的某个应用程序中时,同样的错误将我带到了疯狂的边缘。问题的原因是我在我的应用程序pch文件中包含了GDataXMLNode.h - 请参阅我的SO question

如果您尝试相同(使用GData XML),这也可能是您的解决方案。如果没有,请尝试在你的pch文件中注释掉一些内容 - 说实话,我仍然不知道这个错误背后的确切逻辑,欢迎任何解释......