You don't need C++ wrappers...just code in C.  There's lots more C examples out 
there than C++.
 
Easiest way for me to integrate is to download the amalgamation and include it 
as  a source file in your project.
 
The amalgamzation is at the top of the download page:
 
http://www.sqlite.org/download.html
 
Simple program for you to compile as C++ which I wrote from a question somebody 
had on the list here.
 
#include <iostream>
#include <stdlib.h>
#include "sqlite3.h"
int main()
{
        sqlite3 *db;
        char *errmsg=NULL;
        int rc;
        int i;
        sqlite3_open("test.db",&db);
        rc=sqlite3_exec(db, "CREATE TABLE log (id_client varchar, utc 
number)",NULL,NULL,&errmsg);
        if (rc != SQLITE_OK) {
                puts(errmsg);
                sqlite3_free(errmsg);
        }
        sqlite3_exec(db,"BEGIN",NULL,NULL,&errmsg);
        for(i=0;i<100000;i++) {
         int j=i*10;
         char sql[4096];
         sprintf(sql,"INSERT INTO log VALUES ('%d',%d)",i,j);
         rc=sqlite3_exec(db, sql,NULL,NULL,&errmsg);
         if (rc != SQLITE_OK) {
                 std::cout << errmsg << std::endl;
                 sqlite3_free(errmsg);
                 exit(-1);
         }
        }
        sqlite3_exec(db,"COMMIT",NULL,NULL,&errmsg);
        sqlite3_close(db);
        return 0;
}

 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 

________________________________

From: sqlite-users-boun...@sqlite.org on behalf of smengl90
Sent: Tue 7/6/2010 2:33 PM
To: sqlite-users@sqlite.org
Subject: EXTERNAL:[sqlite] setup sqlite in vc++




Hi guys,

I am trying to setup sqlite to be used with VC++ 2008. Can someone show me
where I can find instructions on how to set it up? and do I need a c++
wrapper to code in C++? If yes, can someone also show how to setup the
wrapper?

Thanks
--
View this message in context: 
http://old.nabble.com/setup-sqlite-in-vc%2B%2B-tp29086729p29086729.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to