From: Thom D. <t.r...@la...> - 2007-01-24 18:28:40
|
> ________________________________________ > From: Michele Joyce [mailto:er...@jl...] > Sent: Wednesday, January 24, 2007 1:12 PM > To: Thom DeCarlo > Cc: Swig-user email list > Subject: Re: [Swig-user] noobie question about struct > > Thom DeCarlo wrote: > > > > I'm just getting started with swig and quickly ran into my > > first problem. > > > > I was working through the SWIGDocumentation.pdf that came > > with the swigwin distribution (v1.31). Section 5.5 "Structures > > and unions" starts with a simple example. > > > > struct Vector { > > double x,y,z; > > }; > > > > I created a swigtest.h file which includes only this definition and ran > > > > swig -python -module swigtest swigtest.h > > > > Then I tried to compile the wrapper file that was produced. However, the > > compile failed because Vector was an undefined identifier. As described > > in the documentation, swig created a bunch of accessor functions for the > > struct Vector, but they include references to the struct Vector, which > > is never defined in the swigtest_wrapper.c file. > > > > Obviously, there is something fundamental that I'm missing here. Can > > somebody give me a quick clue to make this test compile? > > > > Thanks! > > Thom > I can't help with this particular problem, but, I'd really recommend > installing the latest version. Lots of fixes and new features have come > along with 1.3.29 (and on) > Michele Oops! I meant to say that I was using version 1.3.31, not 1.31 (by which I guess you thought I meant 1.3.1.) Thom |