On 5/24/07, Joe Wilson <[EMAIL PROTECTED]> wrote:
--- Alexander Smondyrev <[EMAIL PROTECTED]> wrote: > I am trying to use loadable extensions in Sqlite and I've run into the > following 2 problems: > > 1) I've downloaded src for 3.3.17 Sqlite and build it, but the '.load' > option does not seem to appear when I run the shell. I've used the default > build mechanism with one minor change. I set the flag to disable tcl > extensions. It is likely that I am missing some ./configure option, but I > can't figure out what I need to do. Any advise would be greatly appreciated. Comment out the line in Makefile.in (or the generated Makefile) to enable loadable extensions: # TCC += -DSQLITE_OMIT_LOAD_EXTENSION=1
Thanks for the advise. This almost worked as is. I had to add '-ldl' when building sqlite3 executable. Otherwise I was getting unidentified dlopen, dlclose etc error even though I am not building tcl extensions. Then "./configure && make" as normal.
If you want the FTS1 and FTS2 modules "pre-loaded" in sqlite3, just apply the attached patch to the latest version of the sqlite source tree, and "./configure && make". The fts1 and fts2 modules will be statically linked into sqlite3. No need to load the FTS modules at runtime.
With my new build now succeeding I am still having problems loading shared libraries that I've described in my original message. For a number of reasons I would really like to load my modules at run time, rather than 'pre-load' in sqlite3. For starters, I'd like to figure out why the example with half function which was provided by sqlite team can't be loaded as a shared library. Am I missing something there? Any suggestions would be greatly appreciated. Thanks, - Alex