help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] Can it nest option lists?


From: Dmitry Rutsky
Subject: Re: [help-gengetopt] Can it nest option lists?
Date: Sun, 04 Apr 2004 20:17:22 -0000
User-agent: KMail/1.6.1

> > I'm developing a program with main functionality placed into separate
> > library against which different interface binaries are linked, and I'd
> > like to separate library-specific options from interface ones.  I know
> > this can be done with libpopt, but can this be done with gengetopt as
> > well?
>
> I'm not sure I understood the problem...
> could you please provide an example?

Consider the following problem:  a program comprised of  two major parts, one 
of which is a library linked against the main program's executable --- the 
other part.   Each of these parts has its own set of command-line options to 
be parsed at startup;  it is desirable to process them separately so that 
main program knows nothing about library module's options and vice versa.
A good living example is a GTK application, where call to gtk_init(&argc, 
&argv) gets GTK-specific options and leaves application-specific ones.  So I 
need some way to parse two separately defined sets of options mixed in one 
command-line arguments array, in separately compiled object files.

> Or could this matter be solved by using "section" in gengetopt files?

Sorry, I found no term "section" in documentation for gengetopt having to do 
with gengetopt files.

-- 
        --- Dmitry Rutsky




reply via email to

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