|
Boost Users : |
Subject: [Boost-users] Program_option: problems parsing multiple commands with multiple arguments
From: Luca Luisa (luca.luisa_at_[hidden])
Date: 2010-03-29 06:17:28
Hello,
this is my first post in Boost.
If this post is not in the right mailing list please let me know, many
thanks.
I have problems using the "program_options" library while parsing a
command line with multiple commands with multiple arguments each.
The test.cpp is in attachment.
I would like to pars such a command:
./test --firstCommand=arg1 arg2 arg3 --secondCommand=arg1 arg2 arg3
and having as result:
************************
First command detected
List of parameters passed: arg1, arg2, arg3
Second command detected
List of parameters passed: arg1, arg2, arg3
************************
But the first command bring the second command as part of its list of
arguments with the result:
***********************
First command detected
List of parameters passed: arg1, arg2, arg3, --secondCommand=arg1, arg2,
arg3,
**********************
Any hints would be appreciate.
Regards,
Luca
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net