views:

59

answers:

3

whenever i add this line of code ABPersonViewController *personController = [[ABPersonViewController alloc] init];

im getting this error message ".objc_class_name_ABPersonViewController", referenced from:

+1  A: 

You need to link your app to AddressBook framework.

Eimantas
Hey Thanx,,i have include AddressBook framework in my project also included the header file
Pinky
even then i get this error
Pinky
You need not only include it in your header file, but link it to your project at compile time.
Eimantas
+2  A: 

This is an error generated by the linker when it can't find a definition for the symbol .objc_class_name_ABPersonViewController. This symbol is for the ABPersonViewController defined in AdressBook.framework. So, you need to link your application with AddressBook.framework. To do so, select the application target in the Targets group of the Groups & Files pane in Xcode. Select Get Info from the target's context menu. In the "General" tab of the info panel, add AddressBook.framework to the "Linked Libraries" list.

Barry Wark
Can u let me know how to use ABPesronViewController to display a contact from address book
Pinky
@Pinky I think that's best put into a new question.
Barry Wark
A: 

Hey Thanks dude barry and Eimantas i included the AddressBookFramework it worked

Pinky