
Hi, I have a query regarding boost:: program_options. Is it possible for multiple programs to use a single configuration file? If so, then how? I have two programs which have to use a single configuration file. Both programs have both similar and unique options but have different default values. Thanks in advance. Cheers, -Vijay Samuel

Vijay Samuel wrote:
Hi, I have a query regarding boost:: program_options. Is it possible for multiple programs to use a single configuration file? If so, then how?
I guess the straightforward solution is to declare the options twice -- once per each program? If that's not good, you can create a library, used by both program, which registers the options.
I have two programs which have to use a single configuration file. Both programs have both similar and unique options but have different default values.
I imagine that using a helper library, you should be able to adjust default values depending on which program asks for the options to be registered. - Volodya

Hi, Will using [section] help in any way? And how do i use the [section] tag in my code? There is no documentation regarding this. When i use a [section] in my config file and execute the program i get an error saying section.option is an invalid option. On 5/22/10, Vladimir Prus <vladimir@codesourcery.com> wrote:
Vijay Samuel wrote:
Hi, I have a query regarding boost:: program_options. Is it possible for multiple programs to use a single configuration file? If so, then how?
I guess the straightforward solution is to declare the options twice -- once per each program? If that's not good, you can create a library, used by both program, which registers the options.
I have two programs which have to use a single configuration file. Both programs have both similar and unique options but have different default values.
I imagine that using a helper library, you should be able to adjust default values depending on which program asks for the options to be registered.
- Volodya
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Sent from my mobile device
participants (2)
-
Vijay Samuel
-
Vladimir Prus