简体   繁体   中英

How to link a framework for iPhone development using XCode?

I'm new to iPhone development and Xcode, so this might be really obvious.

I have the exact same problem as referenced on this forum post

I've created a simple list application, starting out with a custom datasource class that simply returns a hard-wired list of data. With that working, I'm now attempting to alter my datasource class to pull data from the address book. I've added a reference to AddressBook/ABAddressBook.h and created an ABAddressBookRef variable. The application compiles fine with that, and I'm able to get Code Sense into the ABAddressBook API. However, if I attempt to initialize my ABAddressBookRef variable by calling ABAddressBookCreate(), I get a link error like this:

"_ABAddressBookCreate", referenced from: -[TestTableDataSource init] in TestTableDataSource.o symbol(s) not found collect2: id returned 1 exit status

The answer to the problem is that he didn't linked the entire framework (see thread)... but what does that mean and how do you do that?

Is this as simple as right-clicking on the "Frameworks" folder, choosing "Add existing Framework" and then navigating to the framework that should be included? (usually two, IIRC, for Address Book).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM