Nicolas Neuss <[EMAIL PROTECTED]> writes:
> Can anyone help?
I can't help much but a warning: CMUCL has problems with defining
foreign function and loading foreign code in the same file. It's
better to load the library in a different file.
> Also, I would be interested if there is a automatic
> translation of C header files in CMUCL ffi code (maybe along the lines
> Matlisp works for Fortran routines).
I have a half finished CMUCL port of OpenMCL's interface generator.
It's not polished and I haven't used it "in anger". Basically it
implements OpenMCL style reader macros to fetch foreign type
information from a type data base at read time. So you can write:
(#_printf (sys:vector-sap "foo bar %d") (int -234))
The #_ reader macros will extract the argument type and the return
type for printf. It also deals with varargs. It also adds a hook to
CMUCL alien parser so that type information for structs and unions can
be looked up in the type data base. The type data base is simply a
big hash table stored in a fasl file created by a modified version of
GCC and slightly post-processed with some lisp code.
Get the package from: <http:common-lisp.net/~heller/fti.tgz>
But you have been warned, it's only half finished and it requires some
persistence to get it to work.
Helmut.