[plt-scheme] C++ Bindings using FFI

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Sat May 6 06:06:30 EDT 2006

On 06/05/06, Hans Oesterholt-Dijkema <hdnews at gawab.com> wrote:
> SWIG can do C++ indeed. In my opinion a combination of SWIG
> and the FFI should be made. I'd use the strengths of both; using
> SWIG to generate FFI code from C(++) header files.

I don't really know about swig, still it is probably possible to
create some C interface and then use FFI to contact with it. About
communication between C/C++, I'll check that out! :)

Quite interested to know more about that. I'll do some tests and post
here afterwards.

> A combination of a CASE tool like SWIG and a good foreign
> interface in PLT scheme could releave programmers of of a great
> deal of the the burden hand coding scheme bindings.

Don't understand how to use both if like Eli said, they both seem to
do the same.

> Best wishes,
> Hans
> Eli Barzilay schreef:
> > On May  6, Hans Oesterholt-Dijkema wrote:
> >
> >> Maybe a combination of SWIG and the FFI can be used.
> >>
> >
> > I don't know if SWIG can handle C++, but in any case, mixing SWIG and
> > the Scheme foreign interface is not a good idea since both do the same
> > thing.  To interface with C++ in an easy way through the Scheme
> > interface, it may be possible to write a C interface layer, and use
> > that from Scheme -- but it might be limited in the same way that C is
> > limited in talking to C++.
> >

Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering

Posted on the users mailing list.