OpenQNX :: The QNX Community Portal

Aug 21, 2008 - 06:20 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 43 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Rodney Stevens
Post subject: Passing command line variables to a phab application  PostPosted: Dec 12, 2007 - 12:37 AM
Guest





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
 
   
Reply with quote Back to top
Martin Gagnon
Post subject: Re: Passing command line variables to a phab application  PostPosted: Dec 12, 2007 - 02:55 AM
Guest





On Wed, Dec 12, 2007 at 11:37:44AM +1100, Rodney Stevens wrote:
Quote:
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
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.