Reputation: 706
I have having an issue when I add new classes to an Xcode Solution, I cannot compile it.
I take the same class and add it to a new project and it works just fine.
This is what i am getting.
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_RIButtonItem", referenced from:
objc-class-ref in MenuViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
All I did was add the following classes to my project. https://github.com/gfontenot/UIAlertView-Blocks
It all started to happen when I upgraded to the latest version of Xcode (4.3.1) I have since downgraded but I still have this issue. I am not missing any libraries like the other solutions state, which I why I am posting this.
Upvotes: 0
Views: 1004
Reputation: 20163
For me, linker errors like that are usually the result of a source file being omitted from the "Compile Sources" build phase, usually after failing to check the "Add to Targets" button when dragging the source files into the project from another location. The headers will be found, allowing the source to compile, but since the object files were never generated, the linker will fail.
Upvotes: 3