본문 바로가기

iPhone dev./Objective C general

“_OBJC_CLASS_$_”, referenced from: error in xcode 4.3.2(코드 옮겼을 때)

So today I ran into a major problem. I got a problem involving my viewcontroller on xcode 4.3.2 as seen in this error message:

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

I noticed that these errors only appear when I program IBActions linking my viewcontroller to additional classes. If I delete the IBActions the errors disappear. Any help is appreciated.

link|edit
feedback

Finally found the answer. In your target settings, locate build phases and navigate to compile sources. Once there just ad the .m file that is getting the error to the list.

link|edit
other thing is to make sure your 'Target' is selected rather than 'Build and Test' while copying/adding any resource – Mobihunterz May 25 at 12:11