[GRASS-dev] grass module execution

Hi All,

How to run grass module from C++ code.I am coding a small application using C++ I want to call grass commands from the application (g.gisenv)

this can be done in different ways

  1. python using gcmd.RunCommand(…)
  2. setup grass environment and execute from c++ code using system command system(“g.gisev”);

I dont want to call in these ways.

My requirement is different
I will link all grass libraries with my application.
init grass using g_gisinit(…)

specify a program {g.gisenv}
give the attributes required to the application
execute the function without spawning a new process [ I think its not possible :frowning: ]
parse the result.
Display results to user

Any pointers will be much appreciated…

Regards