Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top