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*).
>
> --- eric higashino <[EMAIL PROTECTED]> wrote:
> > I am running sqlite 3.4.2 and I am trying to get the
> extension_functions.c
> > extenstion to work.  I have followed the directions:
> >
> > How To Build a Loadable Extension Shared Library on Linux
> >
> > 0. untar latest sqlite3 source code in a new directory
> >
> > 1. cd to the newly untarred sqlite directory
> >
> > 2. Comment out the line in Makefile.in to enable loadable extensions:
> >
> >      # TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
> >
> > 3. ./configure LIBS=-ldl && make sqlite3
> >
> > 4. export LD_LIBRARY_PATH="`pwd`:$LD_LIBRARY_PATH"
> >
> > 5. gcc -I`pwd` -fPIC -shared src/extension_functions.c -o
> libsqlitefunctions.so
> >
> > 6. ./sqlite3
> >
> > and when I do ".load libsqlitefunctions.sosqlite3RegisterExtraFunctions" I
> > get "unable to open shared library".  I tried putting
> > libsqlitefunctions.sointo the current directory but to no avail. I
> > even tried to do ".load
> > ./libsqlitefunctions.so sqlite3RegisterExtraFunctions"
> >
> > Any help???  Or a quick work around to get STDEV and AVG functions that
> are
> > relatively fast.
> >
>
>
>
>
>       
> ____________________________________________________________________________________
> 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