Re: Little question involving sqlite.dll
- Posted by ghaberek (admin) Mar 22, 2023
- 895 views
Euphoria 4.0.5 Windows 10 I often use Sqlite with Euphoria. Works great and is dependable. Use the Eu wrapper.
There currently isn't an "official" SQLite wrapper (yet). Closest we've got is the wrapper I wrote for EuMVC: db/sqlite3.e. Is that what you're using?
My question is: Suppose I want to include the Sqlite interface which is normally via a .dll as a part of the compiled Euphoria program.
This is called static linking and it's not something Euphoria currently supports, although it is technically possible. We'd need to add an option to the translator to indicate which libraries should be linked in, something euc -l sqlite.a -o myapp.exe myapp.ex and the existing define_c_func/proc() routines would have to be extended to find the C functions locally instead of reaching out to the DLL. It might require adding some conditional to call open_dll() differently or some alternative method altogether. The work I'm currently doing to implement libffi may help make this easier so I'll keep it in mind while I'm working through that.
As an alternative I suppose that I could package the Euphoria.exe file with the .dll and use an installer. The point is that I only want a one deliverable item.
You could put the exe and dll into a zip file. That's one item, I guess. Or maybe point the user to download the SQLite DLL on their own. Otherwise I don't have any other suggestions, sorry.
-Greg