CLSQL uses functions that require 64-bit integer parameters and return values. The FFI in most CLSQL implementations do not support 64-bit integers. Thus, C helper libraries are required to break these 64-bit integers into two compatible 32-bit integers.
Makefiles for Microsoft Windows and GNU/Solaris systems are supplied to build the libraries. Since many Microsoft Windows users don't have access to a compiler, the DLL and LIB files for Microsoft Windows are supplied with the distribution.
To build the libraries on a GNU or Solaris, use the shell and change to the root directory of CLSQL. You may need to edit the file interfaces/mysql/Makefile to specify the location of your MySQL installation. The default Makefiles are setup for shared library linking on Linux. If you are using FreeBSD or Solaris, you will need to change the linker setting as instructed in the Makefile. Then, you can give the command
make libsin the root directory of CLSQL to build the libraries interfaces/mysql/clsql-mysql.so and interfaces/clsql-uffi/clsql-uffi.so.
Unzip or untar the UFFI distribution which creates a directory for the UFFI files. Add that directory to Defsystem's asdf:*central-registry*. You can do that by pushing the pathname of the directory onto this variable. The following example code assumes the UFFI files reside in the /usr/share/lisp/uffi/ directory.
(push #P"/usr/share/lisp/uffi/" asdf:*central-repository*) (asdf:oos 'asdf:load-op :uffi)
Unzip or untar the CLSQL distribution which creates a directory for the CLSQL files. Add that directory to Defsystem's asdf:*central-registry*. You can do that by pushing the pathname of the directory onto this variable. The following example code assumes the CLSQL files reside in the /usr/share/lisp/clsql/ directory. You need to load, at a minimum, the main :clsql system and at least one interface system.
(push #P"/usr/share/lisp/clsql/" asdf:*central-repository*) (asdf:oos 'asdf:load-op :clsql-base) ; base clsql package (asdf:oos 'asdf:load-op :clsql-mysql) ; MySQL interface (asdf:oos 'asdf:load-op :clsql-postgresql) ; PostgreSQL interface (asdf:oos 'asdf:load-op :clsql-postgresql-socket) ; Socket PGSQL interface (asdf:oos 'asdf:load-op :clsql-aodbc) ; Allegro ODBC interface (asdf:oos 'asdf:load-op :clsql) ; main clsql package