From: ·············@googlemail.com
Subject: How to use Lisp in C/C++
Date: 
Message-ID: <1188566818.244924.276230@r29g2000hsg.googlegroups.com>
Hello everybody,

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

From: Matthias Buelow
Subject: Re: How to use Lisp in C/C++
Date: 
Message-ID: <5jqnlqFrgtmU3@mid.dfncis.de>
·············@googlemail.com wrote:

> I would like to incorporate a Lisp program into another, C/C++ based
> program.

http://ecls.sourceforge.net/
From: ·············@googlemail.com
Subject: Re: How to use Lisp in C/C++
Date: 
Message-ID: <1188576470.148492.139230@50g2000hsm.googlegroups.com>
Hello,

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
From: Rainer Joswig
Subject: Re: How to use Lisp in C/C++
Date: 
Message-ID: <joswig-0572C5.18163531082007@news-europe.giganews.com>
In article <························@50g2000hsm.googlegroups.com>,
 ··············@googlemail.com" <·············@googlemail.com> wrote:

> Hello,
> 
> 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?

Yes. The "E" for Embeddable .

Read the FAQ, part 2, Embedding:

http://ecls.wiki.sourceforge.net/FAQ

> 
> Best regards,
> Lukas

-- 
http://lispm.dyndns.org
From: ·············@googlemail.com
Subject: Re: How to use Lisp in C/C++
Date: 
Message-ID: <1188578610.934028.14060@r34g2000hsd.googlegroups.com>
Ah, okay, thanks a lot. This feature should be better promoted on
their website.

Have a nice week end,
Lukas

> Read the FAQ, part 2, Embedding:
>
> http://ecls.wiki.sourceforge.net/FAQ
From: Jeff
Subject: Re: How to use Lisp in C/C++
Date: 
Message-ID: <1188598483.784078.126740@19g2000hsx.googlegroups.com>
On Aug 31, 12:43 pm, ··············@googlemail.com"
<·············@googlemail.com> wrote:
> Ah, okay, thanks a lot. This feature should be better promoted on
> their website.
>
> Have a nice week end,
> Lukas
>
> > Read the FAQ, part 2, Embedding:
>
> >http://ecls.wiki.sourceforge.net/FAQ

You could also look at guile, which is embeddable, although it's a
scheme.
From: Rainer Joswig
Subject: Re: How to use Lisp in C/C++
Date: 
Message-ID: <joswig-C19262.00541801092007@news-europe.giganews.com>
In article <························@19g2000hsx.googlegroups.com>,
 Jeff <········@gmail.com> wrote:

> On Aug 31, 12:43 pm, ··············@googlemail.com"
> <·············@googlemail.com> wrote:
> > Ah, okay, thanks a lot. This feature should be better promoted on
> > their website.
> >
> > Have a nice week end,
> > Lukas
> >
> > > Read the FAQ, part 2, Embedding:
> >
> > >http://ecls.wiki.sourceforge.net/FAQ
> 
> 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.
From: news.wanadoo.fr
Subject: Re: How to use Lisp in C/C++
Date: 
Message-ID: <46d901f7$0$27377$ba4acef3@news.orange.fr>
OpenLisp has many industrial projects that use it from C/C++, see 
www.eligis.com
It is by designed, dedicated for this usage.
Christian

<·············@googlemail.com> wrote in message 
·····························@r29g2000hsg.googlegroups.com...
> Hello everybody,
>
> 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
>