Which frameworks to link against to use Address Book APIs?
Which frameworks to link against to use Address Book APIs?
- Subject: Which frameworks to link against to use Address Book APIs?
- From: Matt Gemmell <email@hidden>
- Date: Tue, 27 Aug 2002 21:51:47 +0100
Hi all,
Just starting to play with the Address Book APIs this evening. I've
created a new Cocoa application project in PB, and added
AddressBook.framework to the Linked Frameworks.
I then tried compiling a piece of the sample code included in the
Address Book API's developer documentation (in Additional
Technologies). That code is below, for reference. However, the build
fails, saying "undefined type, found `ABAddressBookRef'". What have I
done wrong?
Here's the code:
ABAddressBookRef AB = ABGetSharedAddressBook();
ABAddressBook *AB = [ABAddressBook sharedAddressBook];
ABSearchElement *nameIsSmith =
[ABPerson searchElementForProperty:kABLastNameProperty
label:nil
key:nil
value:@"Smith"
comparison:kABEqualCaseInsensitive];
NSArray *peopleFound = [AB recordsMatchingSearchElement:nameIsSmith];
The error flags the first line of it with the message I mentioned
above. Any thoughts?
Thanks for any response,
-Matt
--
Matt Gemmell
Scotland Software
http://www.scotlandsoftware.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.