[GRASSLIST:343] Fwd: gis.h problem

Ana Soares tiobrothercamarada at gmail.com
Thu Mar 23 10:54:59 EST 2006


Yes but now I have another problem !

This works fine :

gcc -c -I /usr/lib/grass/include main.c

But :

$ gcc -o prog main.o
main.o: In function `main':
main.c:(.text+0x26): undefined reference to `G_gisinit'
collect2: ld returned 1 exit status

OR

$ gcc -I /usr/lib/grass/include -o prog main.o
main.o: In function `main':
main.c:(.text+0x26): undefined reference to `G_gisinit'
collect2: ld returned 1 exit status

is no good.... :-S




---------- Forwarded message ----------
From: Glynn Clements <glynn at gclements.plus.com>
Date: 23/03/2006 13:48
Subject: Re: [GRASSLIST:332] gis.h problem
To: Ana Soares <tiobrothercamarada at gmail.com>
Cc: grasslist at baylor.edu


Ana Soares wrote:

> I have GRASS 6 installed, but I can't seem do have GIS library
>
> $ gcc main.c
> main.c:8:17: error: gis.h: No such file or directory
>
> Why does this happen?
> What must I do ?

GRASS doesn't install headers into the system header directories (e.g.
/usr/include), but into the GRASS directory hierarchy (e.g.
/usr/local/grass6/include). You need to use a -I switch to specify the
location, e.g.

        gcc -c -I /usr/local/grass6/include main.c

GRASS is quite a complex package, and may be quite hard to use if you
are new to C programming.

--
Glynn Clements <glynn at gclements.plus.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20060323/d5f2ca4b/attachment.html


More information about the grass-user mailing list