[GRASS-dev] Re: [GRASS GIS] #308: Compiler error while building
python swig
GRASS GIS
trac at osgeo.org
Tue Sep 16 04:46:55 EDT 2008
#308: Compiler error while building python swig
----------------------------------+-----------------------------------------
Reporter: cgsbob | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: SWIG (all bindings) | Version: svn-develbranch6
Resolution: | Keywords: python swig
Platform: Unspecified | Cpu: Unspecified
----------------------------------+-----------------------------------------
Comment (by glynn):
Replying to [comment:20 hamish]:
> > Okay; I've removed the swig/python/interfaces directory.
> > python_grass7.i now includes the headers directly (I've also
> > un-nested the structure definitions from the headers).
>
> thanks for that, but the problem AFAICT was not nested headers, it's
with
{{{
struct { "..." } a, b;
}}}
>
> needing to be like:
{{{
struct { "..." } a;
struct { "..." } b;
}}}
The problem occurs when a nested definition is used for multiple fields.
It is solved by extracting the definition then using the tag when defining
the field, i.e.:
{{{
struct foo { ... };
struct bar {
...
struct foo a, b;
...
};
}}}
There's no need to repeat the definition for each field.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/308#comment:22>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list