Closed defunkydrummer closed 7 years ago
Sorry Eitaro,
I should have read the "Installation" section of CL-SQLITE, in which the author says:
"This package does not include SQLite library. It should be installed and loadable with regular FFI mechanisms. On Linux and Mac OS X SQLite is probably already installed (if it's not installed, use native package manager to install it). On Windows PATH environment variable should contain path to sqlite3.dll."
In any case, perhaps you could put a warning on your CL-DBI page, that for SQLITE3, the CL-SQLITE library should be installed according to the instructions provided by the author. Quicklisp will not install SQLITE correctly automatically.
In that way, noobs like me won't be bothering you opening issues ... !
For the noobies to CL out there, like me, who might have the same problem:
These were the steps i followed to load Sqlite3. In my case the environment is windows (yes... yes...) and thus i placed the .dll file under the local-projects/cffi-libs directory, a directory I arbitrarily created.
;; adding the foreign library directory so CFFI can locate the dll
CL-USER> (push #P"c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/all/quicklisp/local-projects/cffi-libs/" cffi:*foreign-library-directories*)
(#P"c:/Users/fegoavil010/Documents/instalados/lisp-portacle/portacle/all/quicklisp/local-projects/cffi-libs/")
;; defining the foreign library so CFFI knows it and can load it
CL-USER> (cffi:define-foreign-library sqlite3 (t (:default "sqlite3")))
SQLITE3
;; loading the library
CL-USER> (cffi:load-foreign-library 'sqlite3)
#<CFFI:FOREIGN-LIBRARY SQLITE3 "sqlite3.dll">
Afterwards, system "sqlite" can be loaded without any error:
CL-USER> (quicklisp:quickload "sqlite")
To load "sqlite":
Load 1 ASDF system:
sqlite
; Loading "sqlite"
[package sqlite.cache]............................
[package sqlite]....
("sqlite")
CL-USER>
Closing the issue !
Hi Eitaro,
First of all, thank you very much for the amazing number of systems you are developing for Common Lisp, like clack, lack, ningle and Caveman2.
I am having the following problem when installing the DBD driver for SQLite:
I get the following error:
EDIT: I see that CFFI is trying to find the external library for SQLITE3.
Do you have a suggestion on which SQLITE3 library to use with CFFI? I was caught off-guard, i thought that the CL-DBI SQLITE3 "driver" already included the "driver" ;-P