Emil Jerabek wrote:
Ah, sorry. I shouldn't have said it is predefined, it is in the gpc unit. So "import gpc;" will do the trick.
I wrote:
In C you have to use the linker name, as revealed in gpc.pas:
CParamCount: Integer; attribute (name = '_p_CParamCount'); external; CParameters: PCStrings; attribute (name = '_p_CParameters'); external;
i.e.:
int _p_CParamCount; const char **_p_CParameters;
To avoid confusion, my suggestion was when you want to access the variables directly from C, Emil's when you want to pass them from Pascal. In fact, the latter is probably better, as it avoids relying on the linker name. Frank -- Frank Heckenbach, f.heckenbach@fh-soft.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8