Skip navigation.
Home
The QNX Community Portal

View topic - Passing command line variables to a phab application

Passing command line variables to a phab application

Read-only archive of qnx.gui (Creating graphical applications within a GUI environment, such as Photon or PhAB) at inn.qnx.com

Passing command line variables to a phab application

Postby Rodney Stevens » Wed Dec 12, 2007 12:37 am

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
Rodney Stevens
 

Re: Passing command line variables to a phab application

Postby Martin Gagnon » Wed Dec 12, 2007 2:55 am

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. ... lizationFn

Good luck

--
Martin
Martin Gagnon
 


Return to qnx.gui

Who is online

Users browsing this forum: No registered users and 1 guest

cron