Sorry I did not answer before, but I was in San Francisco.
On Monday 28 October 2002 06:17, dennis@... wrote:
> is it documented somewhere how to link to and call C libraries from ECL=
> For instance I want to use LDAP from ECL. I've got the openldap librari=
> libldap.a and libldap.so.
> Could I load libldap.so dynamically & call functions defined in it? If =
Currently, there is no way to open a DLL and call arbitrary functions fro=
The only documented way consists on compiling a lisp extension to C, link=
this extension with your DLL and loading it.
You can read the section "Embedding C code in lisp source" in the develop=
manual (http://ecls.sourceforge.net/ecldev.html). There you find simple w=
to define wrappers. The ECL compiler can generate wrappers for functions =
simple arguments (char, int, float, double). For other types you have to =
use of DEFCBODY and type the conversion yourself.
I admit that the FFI is an area which requires a lot of improvement :-(
Max-Planck-Institut fuer Quantenoptik=09+49/089/32905-127
Hans-Kopfermann-Str. 1, D-85748=09=09www.arrakis.es/~worm
Garching b. Muenchen, Germany=09=09worm@...