Bastiaan Veelo wrote:
Emil Jerabek wrote:
If all you need is to pass argc and argv to the library, there are
predefined variables CParamCount and CParameters (of type integer and PCString, respectively, which matches C int and **char).
Yes it is! But I get undeclared identifier errors when using these. Do I need to pull some switches for it to work?
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; 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