[GRASS-user] Call Grass modules from C++ code

Hamish hamish_b at yahoo.com
Fri Feb 15 15:14:39 PST 2013


matteo wrote:
> Ok, I have understood that I need to put the keyword
> "extern". But I'm still confused about how to call other
> Grass module.
> 
> I've tried to see the examples linked in the wiki but it's a
> little bit difficult to understand how they work. Can you
> please suggest me a file where there is an example of
> calling another module?

have a look at the functions in lib/gis/spawn.c.

there is also the less portable G_system() to look at in grass6.

you might look at raster/r.topmodel/misc.c in trunk for an example.


Hamish


More information about the grass-user mailing list