See this file for an example of how to make a loadable extension:

  http://www.sqlite.org/cvstrac/fileview?f=sqlite/src/test_loadext.c&v=1.1

Make note of using

  #include "sqlite3ext.h"

instead of sqlite3.h and the use of the SQLITE_EXTENSION_INIT1 
and SQLITE_EXTENSION_INIT2 macros.

--- eric higashino <[EMAIL PROTECTED]> wrote:
> I cant find the type decleration for sqlite3_api_routines type.  I greped
> the sqlite source directory and couldnt find a definition of it.  Do you
> think this is the reason why I am getting a syntax error?
> 
> On 9/25/07, eric higashino <[EMAIL PROTECTED]> wrote:
> >
> > I have tried this and I get a compilation error "extension-functions.c:1849:
> > error: syntax error before '*' token"
> >
> > That line is where i marked with the arrows.  I can't see why there would
> > be a syntatic error with that?  I have only added this function at the very
> > bottom of the script.  I have tried to take out various parts of that line
> > such as the const or the pointer and no luck.
> >
> > int sqlite3_extension_init(
> >   sqlite3 *db,          /* The database connection */
> >   char **pzErrMsg,      /* Write error messages here */
> >   const sqlite3_api_routines *pApi  /* API methods */){   <<<<<<<<
> >   sqlite3RegisterExtraFunctions(db);
> > }
> >
> >
> > On 9/24/07, Joe Wilson <[EMAIL PROTECTED]> wrote:
> > >
> > > This contrib extension library cannot be used directly as an sqlite
> > > loadable module because it lacks an entry point function with the
> > > prototype:
> > >
> > >     int sqlite3_extension_init(
> > >       sqlite3 *db,          /* The database connection */
> > >       char **pzErrMsg,      /* Write error messages here */
> > >       const sqlite3_api_routines *pApi  /* API methods */
> > >     );
> > >
> > > See http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions
> > >
> > > You could add such a function that calls
> > >
> > >   sqlite3RegisterExtraFunctions(sqlite3*).



      
____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to