On Tuesday 01 April 2003 01:18, Michael Hannemann wrote:
> Following the steps in the developer's guide, it seems like I should be
> quite close. I've been able to copy the stand-alone executable to anot=
> system and watch it run. (2.5MB! Much smaller than ACL or
> Lispworks.) I've produced a .a file, and I've looked at the temporary =
> and .h files. But it seems like there's crucial interface information
> missing; I suspect I could call the munged and re-defined C functions L=
> (L2, &c.), but is there an easier way?
Have you considered using cl_funcall(), cl_apply() and c_string_to_object=
With s =3D c_string_to_object("FIB") you obtain the symbol for your funct=
(assuming that the library has been initialized before). With cl_funcall(=
s, MAKE_FIXNUM(2)), you use your function.
The only problem is initialization. Lisp libraries have to be initialized=
an order which corresponds to the order in which the would be loaded if t=
were *.lsp files. ECL takes care of this when building executable program=
build-program produces the right sequence of C statements for that. If yo=
not want to use ECL to link the files, then I am afraid you will have to=20
inspect the output of build-program and reproduce it yourself.
Sorry, I know the interface is quite ugly, but I am very busy fixing erro=
the lisp part :-)