[GRASS-dev] porting i.spec.sam to grass7

Markus Neteler neteler at osgeo.org
Mon Jan 19 09:01:25 PST 2015


On Mon, Jan 19, 2015 at 5:31 PM, Yann Chemin <ychemin at gmail.com> wrote:
> Hi,
>
> porting to grass7 i.spec.sam (grass-addons/grass7/imagery/)
>
> I am getting a set of complaints like this:
>
> OBJ.x86_64-unknown-linux-gnu/spec_angle.o:(.bss+0x158): multiple definition
> of `Avector'
> OBJ.x86_64-unknown-linux-gnu/main.o:/home/yann/dev/grass-addons/grass7/imagery/i.spec.sam/main.c:92:
> first defined here
>
> while it is actually defined in global.h, and global.h is read in main.c as
> well as in spectral_angle.c . The line 92 in main.c is the first appearance,
> without declaring Avector (just using it).

[neteler at pgis_north i.spec.sam]$ grep Avector *.h
global.h:GLOBAL VEC *b, *Avector;

I guess the GLOBAL declarations need to be fixed as time ago in other
GRASS modules using "extern". See for example:

http://trac.osgeo.org/grass/changeset/32675/grass/trunk/raster/r.to.vect

Markus


More information about the grass-dev mailing list