seangriffin Posted March 1, 2019 Share Posted March 1, 2019 Hi everyone. Sharing some knowledge on how to compile sqlite and make it work with AutoIT in case it helps anyone. The SQLite website below explains how to compile SQLite into both an EXE and DLL. https://www.sqlite.org/howtocompile.html Initially I tried "gcc" with limited success. The EXE file (sqlite3.exe) worked both standalone and also through the AutoIT _SQLite_SQLiteExe command. But the DLL (sqlite3.dll) wouldn't be accepted by AutoIT _SQLite_Startup at all. I then tried Visual Studio's compiler "cl". This method is also described on the page above. Again the EXE file (sqlite3.exe) worked both standalone and also through the AutoIT _SQLite_SQLiteExe command. The DLL (sqlite3.dll) worked in _SQLite_Startup but _SQLite_LibVersion returned a "0" for the version. The compilation command that finally worked (specifically for the DLL) was this one: cl sqlite3.c -DSQLITE_API=__declspec(dllexport) -link -dll -out:sqlite3.dll This one works against all the SQLite commands in AutoIT. Note this assumes you want to create the 32-bit version of SQLite. Cheers, Sean. See my other UDFs: Chrome UDF - Automate Chrome | SAP UDF - Automate SAP | Java UDF - Automate Java Applications & Applets | Tesseract (OCR) UDF - Capture text from applications, controls and the desktop | Textract (OCR) UDF - Capture text from applications and controls | FileSystemMonitor UDF - File, Folder, Drive and Shell Monitoring | VLC (Media Player) UDF - Creating and controlling a VLC control in AutoIT | Google Maps UDF - Creating and controlling Google Maps (inc. GE) in AutoIT | SAPIListBox (Speech Recognition) UDF - Speech Recognition via the Microsoft Speech (SAPI) ListBox | eBay UDF - Automate eBay using the eBay API | ChildProc (Parallel Processing) UDF - Parallel processing functions for AutoIT | HyperCam (Screen Recording) UDF - Automate the HyperCam screen recorder | Twitter UDF - Automate Twitter using OAuth and the Twitter API | cURL UDF - a UDF for transferring data with URL syntax See my other Tools: Rapid Menu Writer - Add menus to DVDs in seconds | TV Player - Automates the process of playing videos on an external TV / Monitor | Rapid Video Converter - A tool for resizing and reformatting videos | [topic130531]Rapid DVD Creator - Convert videos to DVD fast and for free | ZapPF - A tool for killing processes and recycling files | Sean's eBay Bargain Hunter - Find last minute bargains in eBay using AutoIT | Sean's GUI Inspector - A scripting tool for querying GUIs | TransLink Journey Planner with maps - Incorporating Google Maps into an Australian Journey Planner | Automate Qt and QWidgets | Brisbane City Council Event Viewer - See what's going on in Brisbane, Australia Link to comment Share on other sites More sharing options...
Nine Posted March 1, 2019 Share Posted March 1, 2019 1 hour ago, seangriffin said: But the DLL (sqlite3.dll) wouldn't be accepted by AutoIT _SQLite_Startup at all. You need to have both the corresponding .dll for x86 and x64. Got that same problem at first because I didn't have the right dll format. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
jchd Posted March 1, 2019 Share Posted March 1, 2019 (edited) You can also simply download the pre-built binaries for Windows available on the SQLite page. Well, that's unless you absolutely need a custom build with your own set of options. Edited March 1, 2019 by jchd Skysnake and user4157124 2 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Skysnake Posted March 5, 2019 Share Posted March 5, 2019 On 3/1/2019 at 9:10 PM, jchd said: You can also simply download the pre-built binaries for Windows available on the SQLite page. Yes, I can only agree with @jchd. You really do not need to compile your own binaries. You can, of course, do so if you really, really want to, but the standard downloads work just fine. Skysnake Why is the snake in the sky? Link to comment Share on other sites More sharing options...
jchd Posted March 5, 2019 Share Posted March 5, 2019 If you're unsure about which compile option was used to produce a given SQLite DLL you can run the " PRAGMA compile_options;" statement by use of _SQLite_GetTable(). The result is an array of compile options used. Skysnake 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now