[Tutor] Need help with SWIG

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Sat, 7 Jul 2001 12:38:37 -0700 (PDT)


On Fri, 6 Jul 2001, Patrick K. O'Brien wrote:

> If there is anyone here that has experience with SWIG, I could use some
> help. I'm trying to build an interface to a commercial Windows application
> that provides an api in the form of a dll file. I have the C header file and
> tried to run it through SWIG to create the Python interface but SWIG fails
> with a whole bunch of "Syntax error in input" errors. I really don't know
> where to begin and I hate to spend any more time on this than necessary. All
> I want is the darn Python interface so I can start using the dll from
> Python.

SWIG does have a parser to figure out the functions it will wrap, but it
is not perfect.  You may need to nudge it to get it to work.


> If anyone could help I would greatly appreciate it. I can send you the
> .h file as well. Thanks.

I don't know too much about SWIG, but I'm curious about it.  Send the
header over, and I'll play around with it today.