Passing command line variables to a phab application

Are there any reasons why I cannot pass command line variable to a phab
application eg

app_name arg1 arg2

In main() AppBuilder Initialisation has the following

ApInitialize(argc, argv, AbContext);

I cannot find any reference to what happens with argc and argv as there is
no Help on ApInitialize.

All help will be much appreciated.

Rod Stevens

CSIRO Minerals

On Wed, Dec 12, 2007 at 11:37:44AM +1100, Rodney Stevens wrote:

Are there any reasons why I cannot pass command line variable to a phab
application eg

app_name arg1 arg2

In main() AppBuilder Initialisation has the following

ApInitialize(argc, argv, AbContext);

I cannot find any reference to what happens with argc and argv as there is
no Help on ApInitialize.

All help will be much appreciated.

You must assign an Initialisation function in the project properties and
from there you can parse argv and argc. If you use getopt(), don’t
forget to use AbOptions as options strings. That’s explain in the QNX
doc… The right place is just a bit hard to find inside the
documentation… this may help:
http://www.qnx.com/developers/docs/6.3.2/photon/prog_guide/code.html#InitializationFn

Good luck


Martin