[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

documentation about creating modules?

>>>>> "JH" == Joerg Hoehle <Joerg.Hoehle@gmd.de> writes:

JH> My opinion is that `queens' is not a module in the sense of CLISP,
JH> because it requires you to modify subr.d and constsym.d so you
JH> must recompile everything.  It does not use the modules.[dh]
JH> feature.  You can't add queens to an existing lisp.a.

Yes, I used the word "module" to mean "extension module";
a way to interface to CLISP at a low level.

Although it is preferable in almost all cases to use the FFI for adding
features to CLISP, it is actually possible to load up `queens'
without recompiling any of CLISP.

Like this:
1) go to your build directory of CLISP and make a directory "queens".

2) Copy or link in these files from src/queens into "queens".
  Makefile, callqueens.c, link.sh, queens.c

3) Then link in clisp.h or just tweak the Makefile so it can find the
build directory.

4) Finally, go back to the build directory and type:
  clisp-link add-module-set queens base base+queens

The lisp.run and lispinit.mem you get will have the `queens' function

JH> Maybe what's missing is queensmod, `queens' as a CLISP module,
JH> adding a few #ifdef QUEENS_AS_MODULE to callqueens.d.  I can do
JH> that.  But then there's still documentation missing.

You must be using an old version of CLISP.