Error: Undefined symbol for architecture x86_64: “OBJC_CLASS_$_InventoryItem”, referenced from: objc-class-ref in AppDelegate.o

What should I do to solve this problem? I created both the InventoryItem.h & InventoryItem.c files so I don't understand the problem.


More details here as I posted this question also to StackOverflow but have yet to get a response:


http://stackoverflow.com/questions/39284884/error-undefined-symbol-for-architecture-x86-64-objc-class-inventoryitem-r

Replies

Most likely, when you added InventoryItem.c to your project, you forget to add it to the app target. Everything compiles OK because the .h file is there, but the class itself isn't being linked into your app.


Check the Utilities inspecton the right side of the Xcode window, show the Files tab, and look at the Target Membership checkboxes.

After checking the settings for Target Membership for InventoryItem.m, I found out that Target Membership checkboxes for it are correct as far as I know.


Here is a screenshot of the settings for InventoryItem.m:


https://drive.google.com/file/d/0Bz9zmk2v1ZhLQUpfOFFmWE5VdkU/view?usp=sharing


Please let me know if there is any other problem that might be causing this issue.