views:

36

answers:

1

EDIT: This problem has been solved. See below.

Hey all. I'm building an iPhone application against my own library. To do this, I have the library project referenced from within the application. I have the header path properly set up, as compilation doesn't cause any issues. However, I'm having trouble during the linking phase and I get these errors:


Undefined symbols:
  ".objc_class_name_Location", referenced from:
      literal-pointer@__OBJC@__cls_refs@Location in Map.o
  ".objc_class_name_Tag", referenced from:
      .objc_class_name_NamedTag in NamedTag.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

I would suspect it's because I changed some paths, including the relative path of the library project. I've subsequently updated this in Xcode though, so I'm not sure why I'm getting this error.

I've even tried re-adding the library dependency and the problem persists.

Additionally, the library builds and links fine by itself and with its associated tests.

I know the question is the same as this one here, but the given solution doesn't seem to apply to me since my sources are all added to the target: http://stackoverflow.com/questions/1007235/collect2-ld-returned-1-exit-status-error-iphone-sdk-please-help-me

Thanks! Tom

A: 

I was able to solve this. Apparently, I had to "re-add" my library to the "Link Binary With Libraries" section of the Target. (Note, it was already there before, but somehow got dropped when the path to the library changed. I wonder why the change didn't propagate when I updated the project dependency? Oh well. It works.)

Tom