[GRASSLIST:438] Re: grass programming

Ana Soares tiobrothercamarada at gmail.com
Tue Mar 28 05:13:18 EST 2006


Hei :-)

I already did that.

My problem is how to integrate that in a program of my own.
For example,

#include <stdio.h>

#include "interface.h"
#include <unistd.h>
#include <stdlib.h>

#include "gis.h"


int main(int argc, char **argv) {

  printf("Argv[0] = %s\n", argv[0]) ;

  G_gisinit("prot1") ;

  printf("G_program_name => %s\n", G_program_name()) ;

  // if (G_parser(argc, argv))
  //exit (-1);

  //  ask_interface() ;

}

I don 't understant why this doesn't work :-(

Output :
seabiscuit at ubuntu:~/Estagio/GRASS_Prototipo1$ ./prot1
Argv[0] = ./prot1

bla













seabiscuit at ubuntu:~/Estagio/GRASS_Prototipo1$

(this stopped because I did Ctr C)

This is what I'm having trouble understanding ....
Help please :-)



28 Mar 2006 10:08:10 -0000, No Name <grasschoper at rediffmail.com>:
>
>
> there a programmers manual available in download section on official sitye
> of GRASS. Give some time on reading it.
>
> enjoy grass
> nitin
>
> On Tue, 28 Mar 2006 Ana Soares wrote :
>
> >Thanks!
> >
> >That really helped :) But I have a lttle problem : I can't compile it!
> >Any hints ?
> >
> >Thanks :-)
> >
> >2006/3/27, Massimiliano Cannata <massimiliano.cannata at supsi.ch>:
> > >
> > > Ana Soares wrote:
> > >
> > > > Hello :-)
> > > >
> > > > I'm getting really desperate with grass ...
> > > > I want to use its libraries in my C program, but I can't seem to
> even
> > > > understand how to use G_gisinit :(
> > > >
> > > > Is there any manual that you recommend to helo me out?
> > > >
> > > > Help / Rescue would be very much appreciated!!
> > > >
> > > > Thanks :-)
> > >
> > > give a look to r.example and v.exaple files
> > > (http://grass.itc.it/devel/index.php)
> > > hope it helps...
> > > Max
> > >
> > > --
> > >
> > > Eng. Massimiliano Cannata
> > > Scuola Universitaria Professionale della Svizzera Italiana
> > > Istituto Scienze della Terra
> > > Via Trevano, c.p. 72
> > > CH-6952 Canobbio-Lugano
> > > Tel: +41 (0)58 666 62 18
> > > Fax +41 (0)58 666 62 09
> > >
> > >
> > >
>
>
>
> <http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20060328/70a79f86/attachment.html


More information about the grass-user mailing list