[Ecls-list] I do not understand how to link C modules with Lisp main prog

Moshe Goldstein goldmosh at fh.huji.ac.il
Mon Mar 24 09:51:46 UTC 2003


Dear list members:

I read the two ECL guides  - ECL User's Guide and ECL Developer's Guide
-  and tried the trivial example described in the latter (that worked,
certainly), but I do not understand how to build an executable program
composed by one (or more) Lisp program pieces and one (or more) C
program pieces, when the main program is one of the Lisp program pieces.

For example, I do not know how to write an "initialization phase":  I
saw a declaration of an extern C function whose name begins with
"init_"  in the main C program that the ECL compiler generates, but what
I have to write (I supposed it should be some Lisp function, right?).
Could someone, please, send me a tiny example of how to put all the
pieces together in order to have a running program?

In summary:
I wrote several Lisp functions that invoke C functions that I took from
an open-source package. I compiled all the C program pieces using the -c
-ansi options of gcc.
I need to link all the pieces together to build a running program.
The only thing I need in order to understand how to do it with ECL, is a
complete tiny example, or a clear explanation of how to do it.

Thank you in advance for your help.

-- Moshe Goldstein
P.S.
I am using ECL 0.8 in Linux.






More information about the ecl-devel mailing list