Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

“_OBJC_CLASS_$_”, referenced from: error in xcode 4.3.2

Tags:

xcode

ios

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.

like image 659
Ashan Marla Avatar asked Apr 24 '12 17:04

Ashan Marla


1 Answers

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.

like image 55
Ashan Marla Avatar answered Sep 19 '22 08:09

Ashan Marla