help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-gengetopt] mutually exclusive group of options


From: Papp Gyozo (VBuster)
Subject: [help-gengetopt] mutually exclusive group of options
Date: Tue, 12 Jun 2007 19:50:23 +0200

Hi

I've encountered a problem and don't know how to resolve it. I'm developing a 
commandline tool which can use either of two shared libraries (.so in short) 
but only one of those at a time. Furthermore, both .so require different 
options which are available (meaningful) only if the corresponding .so is 
chosen. For example:

 scan --init   --dir1=... --dir2=... ; create an own scanning process

or

 scan --attach --address=... ; attach to a daemon

(I hope it is clearer a little bit now what I'm talking about.)

I know I can specify "init" and "attach" as mutually exclusive group options 
but I don't know how to induce gengetopt to allow dir options only if --init is 
given and --address if --attach is given. 

Any ideas? Thanks in advance

--
Papp, Gyozo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]