[GRASSLIST:1125] Re: Advise for first program in c

Eric G . Miller egm2 at jps.net
Tue Nov 14 02:42:56 EST 2000

On Mon, Nov 13, 2000 at 10:26:25PM -0800, David Finlayson wrote:
> Grass users,
> I am interested in trying to build a C program that
> accesses GRASS and have a few questions (I'm not a
> programmer).
> I am interesting in writing a routine that traces the
> profile of a river and builds an ascii table of x,y
> coordinate pairs and columns of values associated with
> user-supplied list of rasters.  The idea is to trace a
> river profile and dump out the associated variables
> for each pixel on the river, say manning's n,
> elevation, width, slope etc... Really though, it is
> just a simple program to try in C.
> First, do I need to have a full copy of the source
> code for GRASS or can I work with a binary only
> version and just link against the libraries I need
> mentioned in the programmers manual?  (I've never used
> make before either so I don't understand that yet
> either)
> Any first time advise would be appreciated.

I think you need the full source code.  GRASS has it's own "make"
routine called "gmake[5]" that takes care of much of the dirty work.
There are some examples in the programming manual, as well as the source
code (which really can be invaluable).

Good Luck,
Eric G. Miller <egm2 at jps.net>
"Time is Free"

More information about the grass-user mailing list