I would like to incorporate a Lisp program into another, C/C++ based
program. Specifically, I have a set of functions written in Lisp.
These functions, I would like to directly call from C/C++ in which my
main program is written.
So far, I found some hints on the net, but this seems to be either a
very trivial questions or something nobody does. I searched the net,
googled, and read the news groups without finding a satisfying answer.
The most promising tool I found yet has been gcl which generates C
code from Lisp files (gcl -compile -c-file -h-file
<myfunctions.lisp>). Unfortunately, the C code does not make much
sense; it seems the compiler is not designed to allow the code to be
integrated into other projects.
Since mixing program languages is something usual, I was wondering if
anybody knows a tool (rather open source than commercial) or technique
that allows me to do so.
I'll be thankful for every hint, even if this includes the hint that
I'm on a totally wrong track.
Best regards,
Lukas
> I would like to incorporate a Lisp program into another, C/C++ based
> program.
thanks for your hint:
> http://ecls.sourceforge.net/
Maybe I'm missing something, but as far as I understood the
documentation of ecls it has pretty much the same functionality as gcl
has regarding the translation to C. Similar to gcl, the generated C
file in not intended to be included into another C/C++ program, but
for generating native object code to load into the Lisp system.
What I am looking for is a compiler to C that allows me to use the
generated C code or object file as part of my own C/C++ program.
Do I miss something here?
Best regards,
Lukas
Yes. The "E" for Embeddable .
Read the FAQ, part 2, Embedding:
http://ecls.wiki.sourceforge.net/FAQ
>
> Best regards,
> Lukas
Have a nice week end,
Lukas
You could also look at guile, which is embeddable, although it's a
scheme.
Allegro Common Lisp can create DLLs / Shared Libraries
that you can use from your C program.
Allegro CL
http://franz.com/support/documentation/8.1/doc/dll.htm
http://franz.com/support/documentation/8.1/doc/unix-shared-library.htm
LispWorks can create DLLs on Windows.
Corman CL can create DLLs on Windows.
CLISP may be able to be embedded. I'm not sure if it works
in current releases or how it works. Best to ask
on the CLISP mailing list.
<lukas....@googlemail.com> wrote in message
news:1188566818.2...@r29g2000hsg.googlegroups.com...