Hello all, 

I had the bright idea yesterday of trying to use an extension module in
Windows.  I found myself a bit confused, and the messages and
documentation were not as helpful as they might have been.  I suspect I
had a 32/64 bit mismatch in one case, and that sqlite3 wasn't compiled
with extension-module support, but I was unable to prove that to
myself.  

I downloaded and built my own code and the csvfile extension.  I was
using the windows binary downloaded from sqlite.org. The only messages
I managed to produce using the ".load" command were:

Error: The specified module could not be found
Error: The specified procedure could not be found

IIUC these are not SQLite messages; they are OS messages.  I certainly
hope so, because they have that patented Microsoft je ne sais quoi:
something went vaguely wrong.  Very vaguely.  

At first I thought I had a pathname problem, but eventually convinced
myself I was trying to load a 64-bit extension in a 32-bit process.  It
was the growing pile of broken pointers under my desk that clued me
in.  

When I managed to coerce Visual Studio to build a 32-bit DLL, it
elicited the second message, also from the OS.  At the time I thought
the shell as compiled might not support extensions. ISTR that being
mentioned on this very list once upon a time.  I might also have not
really produced a DLL; maybe it was just an executable named .dll. I
don't have the compile steps accessible as I write this, and it's easy
enough to verify when I'm back in the office.  

Things I would have liked to have been able to display on the screen:

1.  The architecture of an executable file, x86 or x64.  
2.  The compilation options used when building binaries posted on the
download page.  In particular, SQLITE_OMIT_LOAD_EXTENSION.  
3.  The name of the module not found. 
4.  The name of the procedure not found. 

Things I would like to verify here:

5.  The 32-bit windows sqlite3 shell supports extensions? 
6.  The above messages come from the OS, and result from LoadLibrary
failing?  IOW, I didn't build a proper extension, windowswise?  
7.  How does the shell behave if SQLITE_OMIT_LOAD_EXTENSION is used?
Obviously the function would fail, but I wonder if ".load" is dropped
from the help and parseable syntax?  
8.  Where is $HOME in windows, wrt .sqliterc?  I tried %appdata%; that
didn't seem to be it.  

Many thanks for clues, instructions, and pointers.  

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

Reply via email to