mutually exclusive group of options

"Papp Gyozo (VBuster)" <[email protected]>
Newsgroups gmane.comp.gnu.gengetopt.general
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.