Symbol not found objc class reference
"_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_pr开发者_开发技巧ac_2AppDelegate.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I'm having this error please help.
The linker doesn't find the object code (binary) for that particular class.
If it is your code, make sure to have the .m/.mm/.c/.cpp source file belong to the target you are building.
If it is in a library, make sure the linker can find it (library search path etc.) and was actually build with the same settings.
The latter paragraph about dyld looks like your problem is just that: dyld was build against another version of libSystem.dylib than your current target, so basically it doesn't have the code you need in it. (Other architecture or base SDK?)
精彩评论