[GRASS-dev] Re: [GRASS GIS] #308: Compiler error while building python swig

GRASS GIS trac at osgeo.org
Sun Sep 14 04:55:27 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:14 hamish]:

 > > First, I suggest replacing the contents of gis.i with "%include
 <grass/gis.h>"
 > > and seeing if that actually causes any errors. Ditto for all of the
 other
 > > interfaces/*.i files.
 >
 > It doesn't know where to find $(MODULE_TOPDIR)/include/

 Does this work:
 {{{
      -I<dir>         - Look for SWIG files in directory <dir>
 }}}
 Also:
 {{{
      -importall      - Follow all #include statements as imports
      -includeall     - Follow all #include statements
 }}}

 > If I get around that by hardcoding the path it shows that _Color_Rule_
 is still a problem:

 > Recursive use of a struct is not the problem, it's the "low, high"
 multiple defn which is creating the syntax error. If I clone that into two
 separate struct defns it builds ok.

 How about:

 {{{
 struct _Color_Value_
 {
     DCELL value;
     unsigned char red;
     unsigned char grn;
     unsigned char blu;
 };

 struct _Color_Rule_
 {
     struct _Color_Value_ low, high;

     struct _Color_Rule_ *next;
     struct _Color_Rule_ *prev;
 };
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/308#comment:15>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list