Linking Error



I’m just trying to run the homepwner after implementing the section called “Creating and retrieving UITableViewCells” (Loc 5270 on the Kindle).

Although the program builds, when I run it I get a linking error and I was wondering if anyone had some clues about where to look for the problem or how to get more information about where my error is.
I’ve been trying to check if I have all my BNRItem vs BNRItemStore in line and before this it was working.


I’ve been looking at this more and it appears that BNRItem.m is not being compiled even when I do a build clean. I’ve verified this by adding typos to the BNRItem.m file and a clean build is successful.

So now I’m curious how I tell the project to build the BNRItem.h and BNRItem.m files as part of the project. I have the line #include “BNRItem.h” at the top of ItemsViewController.m as well as BNRItemStore.h and the @class BNRItem; line at the top of BNRItemStore.h.


Removing the files BNRItem.h and .m and readding them, making sure all the proper check boxes were checked solved the problem.

Sorry about the forum spam!


I just had this issue as well.

This happens when you don’t add the files to the Homepwner target.

Instead of readding the file, you can also just click on BNRItem.m in Project Navigator, then click on the “File Inspector” on the right and check the box “Homepwner” in group “Target Membership.”


Thank you htaccess!
You wrote a detailed reply. It solves the problem and I can understood it.


Thanks htaccess!


Thanks , had the same error, added files by dragging and not like I usually do with “add file to project”


I had the same problem but I read the solution afterward I tried to solve it.

What I did is that I manually included into the building phase, actually I noticed BNRitem.m was not in the Compile Sources section of the Build Phases of the Target view of the Project. You just need to add with the +.

I don’t know if it is a valid way of solving the issue.

Any possible issues of doing it this way?