[GRASS-user] Setting GRASS environment variable in a C program
- step two
Glynn Clements
glynn at gclements.plus.com
Thu May 27 15:38:14 EDT 2010
rabotin wrote:
> If (inside a GRASS session), I access with v.db.connect -p map=GU0507
> it looks ok :
>
> Vector map <GU0507 at simon9> is connected by:
> layer <1> table <GU0507> in database
> </home/rabotin/grassdata/Roujan/simon9/dbf/> through driver <dbf> with
> key <cat>
>
> Do you know how to launch a grass command (e.g. v.db.connect) inside a C
> script
> I try this line in my C progam
>
> system(v.db.connect -p map=GU0507)
>
> but I have an error message
>
> sh: v.db.connect: not found
That indicates the $GISBASE/bin isn't in $PATH.
For a list of envionment variables which may be useful, I suggest
reading this:
http://grass.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list