6

"_OBJC_CLASS_$_AddViewController", referenced from: objc-class-ref-to-AddViewController in ContactsController.o

ld: symbol(s) not found

collect2: ld returned 1 exit status

and the particular controllers are attached and compiling fine.

Thanks

1 Answer 1

24

Make sure that AddViewController.m is added to your compile sources.

Sign up to request clarification or add additional context in comments.

3 Comments

In XCode 4 you need to select your target, go to build phases, then compile sources. When you expand compile sources you will see a + at the bottom you can use to add the source file. If it is already included it will be grayed out and you have another issue otherwise add it.
This can also occur after you have deleted a file, remember to clean Shft+Cmd+K as this can often clean the problem away
I deleted the .m, as I thought my simple class didn't need it. Spoiler alert: it needs it. Even if empty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.