1

I followed the instructions here to add a library for HTMLParser.

However, I get the following error:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_HTMLParser", referenced from:

I read many answers in stackoverflow but couldn't find a solution.

I develop for iphone and ipad and using xcode 4.5

Dejell
  • 13,947
  • 40
  • 146
  • 229
  • are you sure you added the HTMLParser.m to your target? . the error tells you that it has not been compiled – Daij-Djan Dec 29 '12 at 22:41
  • I created a new group called HTMLParser and added all 4 files there. – Dejell Dec 29 '12 at 22:44
  • also, if I import #import "HTMLParser.h" #import "HTMLNode.h" it doesnt show compilation errors – Dejell Dec 29 '12 at 22:48
  • are there any other errors or warnings for the HTMLParser.m / HTMLNode.m? – Daij-Djan Dec 29 '12 at 22:49
  • nope. Only Undefined symbols for architecture armv7: "_OBJC_CLASS_$_HTMLParser", referenced from: objc-class-ref in ChooseTemplateViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) – Dejell Dec 29 '12 at 22:54
  • well, if you're sure it is in the target im stumped (hint: double check if there is a checkmark) – Daij-Djan Dec 29 '12 at 22:56
  • where would the checkmark be? it looks like any other class in xcode – Dejell Dec 29 '12 at 22:59

1 Answers1

1

you use ARC you say but HTMLParser does not, so if you're not getting errors tring to compile it, it is not included & compiled & therefore missing at link time.

see: How can I disable ARC for a single file in a project?

Community
  • 1
  • 1
Daij-Djan
  • 49,552
  • 17
  • 113
  • 135