Generally, each driver has to be configured separately, but if the database packages such as ODBC, MySql, etc., are installed in standard places then the XSB configuration mechanism will do the job automatically.
Under Windows, the command
makexsb_wind
in the directory XSB
packages\dbdrivers\mysql\cc\NMakefile.mak
to indicate where MySQL is installed.
Under Unix, the configure script will build the drivers automatically if the -with-dbdrivers option is specified. If, however, ODBC and MySQL are not installed in their standard places, you will have to provide the following parameters to the configure script:
Under Cygwin, the ODBC libraries come with the distribution; they are located in the directory /cygdrive/c/cygwin/lib/w32api/ and are called odbc32.a and odbccp32.a. (Check if your installation is complete and has these libraries!) Otherwise, the configuration of the interface under Cygwin is same as in unix (you do not need to provide any ODBC-specific parameters to the configure script under Cygwin).
If at the time of configuring XSB some database packages (e.g., MySQL) are not installed on your system, you can install them later and configure the XSB interface to them then. For instance, to configure the ODBC interface separately, you can type
cd packages/dbdrivers/odbc
configure
Again, if ODBC is installed in a non-standard location, you might need to
supply the options -with-odbc-libdir and -with-odbc-incdir to
the configure script. Under Cygwin ODBC is always installed in a
standard place, and configure needs no additional parameters.
Under Windows, separate configuration of the XSB-DB interfaces is also possible, but you need Visual Studio installed. For instance, to configure the MySQL interface, type
cd packages\dbdrivers\mysql\cc
nmake /f NMakefile.mak
As before, you might need to edit the NMakefile.mak script to tell the
compiler where the required MySQL's libraries are. You also need the file
packages:- export mysql_info/2. mysql_info(support, 'yes'). mysql_info(libdir, ''). mysql_info(ccflags, ''). mysql_info(ldflags, '').
Similarly, to configure the ODBC interface, do
cd packages\dbdrivers\odbc\cc
nmake /f NMakefile.mak
You will also need to create the file packages:- export odbc_info/2. odbc_info(support, 'yes'). odbc_info(libdir, ''). odbc_info(ccflags, ''). odbc_info(ldflags, '').