[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accessing C/C++ structs in Guile.
From: |
Bill Gribble |
Subject: |
Re: Accessing C/C++ structs in Guile. |
Date: |
Fri, 16 Mar 2001 09:31:57 -0600 |
User-agent: |
Mutt/1.3.15i |
On Thu, Mar 15, 2001 at 08:37:18AM +0100, Martin Grabmueller wrote:
> > 2) Is there some automated way that will take the header file holding
> > the C/C++ structure definition and generate necessary Guile code?
>
> Have you looked at the interface generator SWIG yet? I haven't used
> it either and don't have an URL handy, but maybe it will help you.
Gnucash uses 'g-wrap', which takes a scheme interface definition file
and generates c and scheme glue code. As our usage of guile has
grown, so has g-wrap's sophistication about data types and memory
management semantics. It's not perfect but it's good enough for our
purposes and getting better all the time.
The g-wrap maintainer is Rob Browning (address@hidden); right now
the only way to get it is from the Gnucash ftp site;
ftp://ftp.gnucash.org/pub/g-wrap/source/ . Unfortunately there have
been some major interface changes since the documentation was last
updated; the best way to figure out what's going on is to look at
examples.
Thanks,
Bill Gribble