On Jul 12, 2008, at 11:25 PM, John Velman wrote:

Thanks, Chris,

Using the SQLite 3 api as you suggest sounds good, but there are a couple
of things that must be obvious to the initiated, but not to me (yet).

As I understand, the SQLite 3 api is a C api. Can I do C function calls directly from Objective C? Seems plausible, since Obj C is an extension of
C, and if I understand, Objective C is translated into C during the
compile.

Yes. Objective-C is a superset of C. Anything that works in C works in Objective-C.

If that's OK so far, how about linking? Is Linking to the SQLite library
transparent from XCode?

Looks like the CoreData framework is directly linked against sqlite. So you can just include <sqlite3.h> and linkage will be fine if you already depend on that framework. (Which you probably do :-)

% otool -L /System/Library/Frameworks/CoreData.framework/CoreData | grep sqlite /usr/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)

The raw SQLite API is pretty simple. If you need help then I would suggest to get the SQLite book.

 http://www.apress.com/book/view/9781590596739

(The index of the book sucks, i would suggest to buy the PDF if you don't mind reading on the screen)

 S.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to