I'm sorry, but I still don't understand :( Can someone explain this to me ?<br>
<br>
Thanks.<br><br><div><span class="gmail_quote">2006/3/24, Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Ana Soares wrote:<br><br>> int G_gisinit (char *program_name)initialize gis libraryThis routine reads<br>> the user's GRASS environment file into memory and makes sure that the user<br>> has selected a valid database and mapset. It also initializes hidden
<br>> variables used by other routines. If the user's database information is<br>> invalid, an error message is printed and the module exits. The *program_name<br>> * is stored for later recall by *G_program_name.* It is recommended that
<br>> argv[0] be used for the *program_name<br>> *<br>><br>> *Ok.<br>> *<br>><br>> *So I use it in my program, like :<br>> *<br>><br>> * int main(int argc, char **argv) {<br>><br>> G_gisinit(argv[0]) ;
<br>> }<br>><br>> *<br>><br>> And the program just stands there :-S<br>><br>> I'm really confused! After all, what does this function do ?<br><br>It checks that the GRASS environment is set up correctly, and
<br>initialises some important variables.<br><br>> How am I supposed to use it?<br><br>Like the above. Then you need to use G_define_{module,flag,option}<br>followed by G_parser(). What happens after that depends upon your
<br>program, but all GRASS modules start with a common framework involving<br>G_gisinit() and G_parser().<br><br>Look at doc/raster/r.example or doc/vector/v.example for examples of<br>how to write GRASS modules.<br><br>--
<br>Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br></blockquote></div><br>