Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/beardedd/public_html/home/index.php on line 61
hOme.beardedDonkey - HOWTO Compile spelldiff Extension for SQLite3 on Windows 10
HOWTO Compile spelldiff Extension for SQLite3 on Windows 10 
I recently was able to compile an extension for SQLite3 on Windows 10. I wanted to use the editdist3 function for SQLite3 which is used to compare how similar strings are. To get he function you have to compile the extension from source code. I will provide the compiled extension here as a DLL as well as the process to compile from source.

Firstly, I found that I had a compiler available to me on the Windows cmd prompt. I think this is because I have Qt Creator installed, which is a free download and a great tool for writing GUI programs with C++ if you know about that. So I'll assume you have gcc available to you on the command prompt.

Next, you need to download the source files from the SQLite website: https://www.sqlite.org/download.html
Get the sqlite-amalgamation ZIP and the sqlite-src ZIP, you will need both.

Extract the sqlite-src ZIP to a temporary folder. Open the sqlite-amalgamation ZIP and copy the sqlite3.h and sqlite3.c files to clipboard. Open to where you extracted the sqlite-src ZIP with Windows Explorer then go into the ext/misc folder. Paste the sqlite3.h and sqlite3.c files into that folder.

Next, open a cmd prompt and change to the sqlite-src/ext/misc folder. Enter the following command to compile the extension:
gcc -I -g -shared spellfix.c -o spellfix.dll

After a little work time, the cmd prompt will return and you should find a file called spellfix.dll in the sqlite-src/ext/misc folder.

To use the extension, it depends on how you're using SQLite. If you're using a front end program, check the menus for a Load Extension type option, and select the spellfix.dll file. You can then use the editdist3 function in SQLite.


SQLite - Spellfix Implementation
SQLite Download
Qt Creator

[ view entry ] ( 186 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 38 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>