2011-04-29 101 views
1
"_OBJC_CLASS_$_InputAmountVC", referenced from: 

objc-class-ref-to-InputAmountVC in p0931917_prac_2AppDelegate.o 

ld: symbol(s) not found 
collect2: ld returned 1 exit status 

Ld "build/Debug-iphonesimulator/p0931917 prac 2.app/p0931917 prac 2" normal i386 
cd "/Volumes/Storage/p0931917 prac 2" 
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/Volumes/Storage/p0931917 prac 2/build/Debug-iphonesimulator" "-F/Volumes/Storage/p0931917 prac 2/build/Debug-iphonesimulator" -filelist "/Volumes/Storage/p0931917 prac 2/build/p0931917 prac 2.build/Debug-iphonesimulator/p0931917 prac 2.build/Objects-normal/i386/p0931917 prac 2.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -o "/Volumes/Storage/p0931917 prac 2/build/Debug-iphonesimulator/p0931917 prac 2.app/p0931917 prac 2" 

dyld: shared cached file was build against a different libSystem.dylib, ignoring cache 
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache 
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache 
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache 
dyld: shared cached file was build against a different libSystem.dylib, ignoring cache 
Undefined symbols: 
    "_OBJC_CLASS_$_InputAmountVC", referenced from: 
     objc-class-ref-to-InputAmountVC in p0931917_prac_2AppDelegate.o 
ld: symbol(s) not found 
collect2: ld returned 1 exit status 

我有這個錯誤請幫忙。找不到符號objc分類參考

回答

1

鏈接器找不到該特定類的目標代碼(二進制)。

如果是您的代碼,請確保.m/.mm/.c/.cpp源文件屬於您正在構建的目標。

如果在庫中,請確保鏈接程序可以找到它(庫搜索路徑等),並且實際上是使用相同的設置構建的。

後者款約dyld的看起來像你的問題就是:dyld的是建立對另一版本libSystem.dylib的比你的當前目標,所以基本上不會有你在它需要的代碼。 (其他架構或基礎SDK?)