views:

227

answers:

1

Sorry I imagine I'm missing something basic here. Before I write up a bunch of details on the specifics of the class I'd appreciate a nudge or smack on the head about the meaning of this build error.

I have a subclass of NSObject SiteAnnotation that should be conforming to the MKAnnotation protocol. It is #imported in the ViewController in question

When I try to alloc/init:

SiteAnnotation *thisAnnotation = [[SiteAnnotation alloc] init];

This is the build error which occurs:

Link /build/Debug-iphonesimulator/testbed.app/testbed
  ".objc_class_name_SiteAnnotation", referenced from:
   literal-pointer@__OBJC@__cls_refs@SiteAnnotation in MapViewController.o
   Symbol(s) not found
   collect2: ld returned 1 exit status

Any tips appreciated.

+1  A: 

Check that the file containing SiteAnnotation is still in your build target. Say it's SiteAnnotation.m - click that file, press Cmd+i (for Get Info), and check the Targets tab.

Brian
Thanks! That worked. I am however baffled at why this was removed from the target as I don't recall doing anything like that. Perhaps I didn't add it properly in the first place either that or my cats are getting even more devious than normal.
Nick