P Kishor wrote:
> so, I have read the tutes on the website, but just wanted to confirm...
> 
> I want to take baby steps to including sqlite's capabilities in my
> modeling program. Do I just include sqlite3.h and compile my program
> and magic will happen, or do I need to do something else?
> 
> Using Xcode. The model itself has about 30 or 40 different .c files
> and about a dozen or so .h files.
> 
> I am a C newbie (but, by golly, I will learn some by the end of this),
> so be gentle in your replies.
> 

Grab the amalgamation,  add sqlite3.c to your makefile and include 
sqlite3.h in your program files as necessary.  At some point, you may 
want or need to add some compilation options depending upon your system 
(e.g. thread safety or page size).

I usually create a wrapper for the database access so I can have some 
abstraction which makes sense for the objects I am working with and 
isolate all the SQL into one area of the code.  What this wrapper looks 
like will largely depend upon your system and how you use SQLite.

If you program in C++, you could consider a C++ wrapper to make your 
life even simpler.  SQLiteDatabase.cpp from WebKit can provide a good 
starting point or be used as inspiration to roll your own.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to