> Or is there some other init function that can be called to maintain it in > one file?
I don't know about that. However, I can see two approaches you could use to keep them in the same file: (1) Since your main is at the bottom of the file, right before it (just after #ifdef MAIN, say), add these lines: #undef sqlite3_open #undef sqlite3_close #undef sqlite3_exec #undef sqlite3_free (2) Move your main block to the top to just after #include "sqlite3.h" and just before #include "sqlite3ext.h". Best regards, Peter > -----Original Message----- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Black, Michael (IS) > Sent: Thursday, January 05, 2012 7:35 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SegV at sqlite3_open() (Was: Re: How to sort within > a text field) > > Yup...putting the main in a separate file fixed it. > > Thanks. > > > > Or is there some other init function that can be called to maintain it in > one file? > > > > Michael D. Black > > Senior Scientist > > Advanced Analytics Directorate > > Advanced GEOINT Solutions Operating Unit > > Northrop Grumman Information Systems > > ________________________________ > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on > behalf of Peter Aronson [pbaron...@att.net] > Sent: Wednesday, January 04, 2012 12:02 PM > To: sqlite-users@sqlite.org > Subject: EXT :[sqlite] SegV at sqlite3_open() (Was: Re: How to sort within > a text field) > > > But it segfaults on me at sqlite3_open() and I can't figure out > why...there's > >no stack info. > > That's because you have it in the same file that sqlite3ext.h is included > in, > and the call to sqlite3_open() is really to sqlite3_api->open(), but since > you > haven't executed SQLITE_EXTENSION_INIT2 at that point, the sqlite3_api > variable > is a NULL pointer. Thus a SegV without a stack trace. > > Best regards, > > Peter > _______________________________________________ > 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 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users