Sqlite c library on mac os?

Does anyone know what it takes to read and write to the sqlite database from program c on mac os x? I found the sqlite3 command line tool on os x, but the sqlite.h file does not appear anywhere. I understand that coreData can use sqlite format, all this is pretty confusing. When I searched for the built-in sql library for C, I never know if I will find a command line tool or a c library or both.

+6
c sqlite macos
source share
2 answers

No sqlite.h . The title is called sqlite3.h .

+4
source share

There is /usr/include/sqlite3.h on my Mac. You will also need to link your program to the library. Use -lsqlite3 with your link command.

+5
source share

All Articles