Boost logo

Boost Users :

Subject: Re: [Boost-users] Program_option: problems parsing multiple commands with multiple arguments
From: Luca Luisa (luca.luisa_at_[hidden])
Date: 2010-03-30 01:28:50


Vladimir Prus wrote:
> Luca Luisa wrote:
>> 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.
>
> Is this problem present in 1.42? I believe at least one bugs with similar
> symptoms was fixed there?
>
> - Volodya
>
I have the version 1.38.1 in Ubuntu.


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