Re: [boost] program_options: Why it throw ambiguous_option?

Well maybe as of a few days ago, but yes. Anyway, you should try to debug it.
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Peng Yu Sent: Wednesday, January 24, 2007 6:45 AM To: boost@lists.boost.org Subject: Re: [boost] program_options: Why it throw ambiguous_option?
Hi,
Are you talking about CVS described at http://www.boost.org/more/getting_started.html#CVS
The boost in CVS should make the following code work, right?
Thanks, Peng
On 1/24/07, Sohail Somani <s.somani@fincad.com> wrote:
This works for me in CVS.
-----Original Message----- From: boost-bounces@lists.boost.org on behalf of Peng Yu Sent: Tue 1/23/2007 8:33 PM To: boost@lists.boost.org Subject: [boost] program_options: Why it throw ambiguous_option?
Hi,
I got the following error for the program list below. Where program_options considers "help" and "help_abc" as ambiguous?
$ ./main --help terminate called after throwing an instance of 'boost::program_options::ambiguous_option' what(): ambiguous option help Aborted
Thanks, Peng
#include <boost/program_options.hpp> namespace po = boost::program_options;
int main(int ac, char* av[]) { po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("help_abc", po::value<int>(), "set compression level") ;
po::variables_map vm; po::store(po::parse_command_line(ac, av, desc), vm); po::notify(vm);
return 0; } _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Hi, Actually, I'm only a boost user not a developer. The boost version that I have is 1.33.1. Unfortunately, I can't install the newest cvs version. Can you point to me if there is any workaround to solve this problem? Thanks, Peng On 1/24/07, Sohail Somani <s.somani@fincad.com> wrote:
Well maybe as of a few days ago, but yes. Anyway, you should try to debug it.
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Peng Yu Sent: Wednesday, January 24, 2007 6:45 AM To: boost@lists.boost.org Subject: Re: [boost] program_options: Why it throw ambiguous_option?
Hi,
Are you talking about CVS described at http://www.boost.org/more/getting_started.html#CVS
The boost in CVS should make the following code work, right?
Thanks, Peng
On 1/24/07, Sohail Somani <s.somani@fincad.com> wrote:
This works for me in CVS.
-----Original Message----- From: boost-bounces@lists.boost.org on behalf of Peng Yu Sent: Tue 1/23/2007 8:33 PM To: boost@lists.boost.org Subject: [boost] program_options: Why it throw ambiguous_option?
Hi,
I got the following error for the program list below. Where program_options considers "help" and "help_abc" as ambiguous?
$ ./main --help terminate called after throwing an instance of 'boost::program_options::ambiguous_option' what(): ambiguous option help Aborted
Thanks, Peng
#include <boost/program_options.hpp> namespace po = boost::program_options;
int main(int ac, char* av[]) { po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("help_abc", po::value<int>(), "set compression level") ;
po::variables_map vm; po::store(po::parse_command_line(ac, av, desc), vm); po::notify(vm);
return 0; }
participants (2)
-
Peng Yu
-
Sohail Somani