Reputation: 424
I'm trying to purse a XML file with TBXML I have done to following steps to use TBXML
after I add the following line (taken from the TBXML Guides) it comes up with an error that I should not use retain if I'm using Automatic Reference Counting.
TBXML * tbxml = [[TBXML tbxmlWithURL:[NSURL URLWithString:@"http://www.w3schools.com/XML/note.xml"]] retain];
After I remove the retain I end up with
TBXML * tbxml = [TBXML tbxmlWithURL:[NSURL URLWithString:@"http://www.w3schools.com/XML/note.xml"]];
When I try to run the App it shows the Following Errors:
"_OBJC_CLASS_$_TBXML", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What should I do and how can I fix it?
Thank you
Upvotes: 0
Views: 998
Reputation: 11
This error means that the linker cannot find the compiled code for TBXML - most likely because it's not actually being compiled.
Select the TBXML.m file in the navigator, then open the "Utilities" panel on the right and make sure that your target is checked under "Target Membership".
Upvotes: 0
Reputation: 39988
Make sure that you have included your file in target i.e. it is check marked in target membership tab
Upvotes: 0