view INSTALL @ 10:7947baf7a624

FIX: error in module import statement.
author samer
date Wed, 25 Jan 2012 15:03:40 +0000
parents 60b7b78b3167
children 256016cddcba
line wrap: on
line source
*** Prolog Matlab interface
***
*** Authors: 
***    Samer Abdallah
***    Centre for Digital Music, 
***    Queen Mary, University of London
***
***    Christophe Rhodes
***    Centre for Computational Creativity
***    Goldsmiths College, University of London
***
*** Dec 2004--January 2012


-------------------------------------------------------------------------
BUILDING/INSTALLATION


Before you start, you need a working SWI Prolog installation and
a Matlab installation. The compilation is done using the swipl-ld utility
that comes with SWI.  This only has a hope of working on Unix systems, 
and I've only tried with Mac OS X and Linux. 

You also need the plcore package, which contains the required Prolog
libraries utils.pl, dcgu.pl and ops.pl.


*** Binary and Prolog code ***

There is a template makefile in Makefile.templ
Copy it to Makefile and adjust the configuration variables at 
the top to suit your system.
	
Then run
	$ make 
	$ make install

This should copy the binary object and Prolog libraries to the target
installation directory. SWI Prolog needs to be able to find them,
eg, with INSTALL_PL_TO=~/lib/prolog and INSTALL_LIB_TO=~/lib/prolog/x86_64 
I put

	file_search_path(foreign,'/Users/samer/lib/prolog/x86_64').

into my ~/.plrc
Since ~/lib/prolog is automatically in the file_search_path(library,_),
nothing else needs to be done. If you install the libraries somewhere
else, you will need to add a file_search_path(library,PathToLibraries)
clause.



** Matlab code **

The subdirectories of the matlab directory need to be in your matlab
path, or the contents copied to somewhere already in you Matlab search
path.




-------------------------------------------------------------------------
SANITY CHECK

If the installation is ok, then the following should work:

	$ swipl
	?- use_module(library(plml)).
	 ...
	Yes.

	?- ml_open(ml).  % ml is the name assigned to the Matlab engine instance
	Matlab engine (ml) open.

	Yes

	?- float(A)===2*pi.
	A = 6.28319