Does anyone know what is required to be able to read and write to a sqlite database from a c program on mac os x? I have found the sqlite3 commandline tool on os x, but there doesn't seem to be a sqlite.h file anywhere. It's my understanding that coreData can use the sqlite format, the whole thing is quite confusing. When I have looked for an embeded sql library for C, I never know if what I find is the command line tool or a c library or both.
Ok thanks, I found it here now. I saw some references to sqlite.h after some Google searches, but that does not always brings correct answers as we know. Thank you.
Fred
2010-03-06 19:46:33
A:
On my Mac there is a /usr/include/sqlite3.h
. You will also need to link your program with the library. Use -lsqlite3
with your link command.
Carl Norum
2010-03-06 19:41:22
Oh, yeah I have it too. Hmm, I looked for sqlite.h but I indeed have the sqlite3.h. What is the difference? Is sqlite3.h a newer version only? Thanks.
Fred
2010-03-06 19:43:39
`sqlite3.h` is the interface for SQLite version 3.0. Lots more information available at the SQLite webpage: http://www.sqlite.org/version3.html
Carl Norum
2010-03-06 19:45:47