Apple Mach-O Linker(id)错误 - 困惑?

时间:2012-02-03 22:36:16

标签: objective-c ios xcode linker-errors mach-o

在我完成构建之前,我的项目没有错误。这是错误日志。

Ld "/Users/stephanieasan/Library/Developer/Xcode/DerivedData/WC_Class_Codes-fgxjeudpfimhnebtmvmxtzlirxnz/Build/Products/Debug-iphonesimulator/WC Class Codes.app/WC Class Codes" normal i386
cd "/Users/stephanieasan/Desktop/SDK Projects/WC Class Codes"
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/clang -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -L/Users/stephanieasan/Library/Developer/Xcode/DerivedData/WC_Class_Codes-fgxjeudpfimhnebtmvmxtzlirxnz/Build/Products/Debug-iphonesimulator -F/Users/stephanieasan/Library/Developer/Xcode/DerivedData/WC_Class_Codes-fgxjeudpfimhnebtmvmxtzlirxnz/Build/Products/Debug-iphonesimulator -filelist "/Users/stephanieasan/Library/Developer/Xcode/DerivedData/WC_Class_Codes-fgxjeudpfimhnebtmvmxtzlirxnz/Build/Intermediates/WC Class Codes.build/Debug-iphonesimulator/WC Class Codes.build/Objects-normal/i386/WC Class Codes.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40000 -framework iAd -lsqlite3.0 -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/stephanieasan/Library/Developer/Xcode/DerivedData/WC_Class_Codes-fgxjeudpfimhnebtmvmxtzlirxnz/Build/Products/Debug-iphonesimulator/WC Class Codes.app/WC Class Codes"

ld: duplicate symbol _OBJC_IVAR_$_ListTableViewController.DBPath in /Users/stephanieasan/Library/Developer/Xcode/DerivedData/WC_Class_Codes-fgxjeudpfimhnebtmvmxtzlirxnz/Build/Intermediates/WC Class Codes.build/Debug-iphonesimulator/WC Class Codes.build/Objects-normal/i386/Code.o and /Users/stephanieasan/Library/Developer/Xcode/DerivedData/WC_Class_Codes-fgxjeudpfimhnebtmvmxtzlirxnz/Build/Intermediates/WC Class Codes.build/Debug-iphonesimulator/WC Class Codes.build/Objects-normal/i386/ListTableViewController.o for architecture i386
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/clang failed with exit code 1

我很困惑,我一直试图调试这几个小时没有成功。

2 个答案:

答案 0 :(得分:16)

Code.m,你不小心说了这个:

#import "ListTableViewController.m"

你的意思是这样说:

#import "ListTableViewController.h"

答案 1 :(得分:-1)

或者您尝试导入的课程具有相似的班级名称。