This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
Re: guile and SWIG
- To: ps at radiac dot mine dot nu
- Subject: Re: guile and SWIG
- From: mkoeppe at mail dot Math dot Uni-Magdeburg dot De (Matthias Köppe)
- Date: 18 Jul 2000 18:33:21 +0200
- Cc: guile at sources dot redhat dot com
- References: <20000718170822.A3267@radiac.mine.nu>
Patrik Sundberg <ps@radiac.mine.nu> writes:
> I would like to hear from anyone using SWIG with guile. I don't seem to get
> things to work with my setup here and I am not sure SWIG really supports new
> versions of guile since the docs is kind of unclear about it.
I have modified SWIG to support current versions of Guile (>= 1.3.4)
and to represent C pointers as Guile smobs instead of mangling them
into strings. This also fixes memory leaks known from SWIG 1.1p5. I
suggest you get release 1.3a3 of SWIG, which includes most of my
changes. Then call swig like this:
swig -guile -with-smobs -package swig -Linkage hobbit ...
> I would also hear some opinions about g-wrap vs SWIG. I personally think
> SWIG seems to have more features and the big pro of generating code for many
> scripting language.
I haven't looked thoroughly at g-wrap but it seems much cleaner to
me. It requires you to write an interface definition in scheme,
though; in SWIG, you can get away by putting a little markup into your
.h files, so newly declared functions will show up automatically in
your Guile after a recompile.
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe