views:

632

answers:

1

Hi All, I have tried making a static lib on iPhone but I am not able to use it in other project. I am getting this error

.objc_class_name_XMLParser", referenced from:
      literal-pointer@__OBJC@__cls_refs@XMLParser in Minutes2MidnightViewController.o
  ".objc_class_name_TickerViewController", referenced from:
      literal-pointer@__OBJC@__cls_refs@TickerViewController in Minutes2MidnightViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

" XML..and Ticker...are my classes using them static lib is made and "MinutesToMidnight" is the project where I am using this static Lib. I think this is something related to Linker error but how to resolve ? Please Help.

+2  A: 

If you are cross-referencing the static lib project you must drag and drop your lib icon from its project group to the "Link binary with libraries" target group.

Otherwise you must add your library path to the "Other linker flags" build setting in Xcode project or target info.

See Implementing Static Libraries In iPhone also.

IlDan