This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: guile and SWIG


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]