Re: [GRASS-user] Setting GRASS environment variable in a C program - step two

2010-05-28 Thread rabotin
It finally works ! For information, the issue was here setenv(GISBASE,/usr/lib/grass64/dist.i486-pc-linux-gnu,0); I replace by this following line setenv(GISBASE,/usr/lib/grass64/,0); and it works Thanks again for your help Glynn Michael Rabotin Glynn Clements a écrit : rabotin wrote:

Re: [GRASS-user] Setting GRASS environment variable in a C program - step two

2010-05-27 Thread rabotin
If (inside a GRASS session), I access with v.db.connect -p map=GU0507 it looks ok : Vector map gu0...@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.

Re: [GRASS-user] Setting GRASS environment variable in a C program - step two

2010-05-27 Thread Glynn Clements
rabotin wrote: If (inside a GRASS session), I access with v.db.connect -p map=GU0507 it looks ok : Vector map gu0...@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

Re: [GRASS-user] Setting GRASS environment variable in a C program - step two

2010-05-26 Thread Glynn Clements
rabotin wrote: After that , using db_open_database(driver,handle) command launch a segmentation fault. Is it because my handle is a null value ? Possibly; change: std::cout driver std::endl; to: std::cout driver std::endl; to confirm this. Are some commands missing to

Re: [GRASS-user] Setting GRASS environment variable in a C program - step two

2010-05-26 Thread rabotin
Thanks for helping me, as you wrote I change std::cout driver std::endl; to: std::cout driver std::endl; And I got a zero value return . So my driver isn't set ? Is the problem from the following lines : setenv(DBF_DRIVER,dbf,1);

Re: [GRASS-user] Setting GRASS environment variable in a C program - step two

2010-05-26 Thread Glynn Clements
rabotin wrote: std::cout driver std::endl; And I got a zero value return . So my driver isn't set ? Is the problem from the following lines : setenv(DBF_DRIVER,dbf,1); setenv(DB_DATABASE,$GISDBASE/$LOCATION_NAME/$MAPSET/dbf,1); These will be ignored. The default DBMI settings are