Opened 10 years ago
Last modified 9 years ago
#7256 new Bugs
wrong error message for program options with dashes
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | To Be Determined | Component: | program_options |
Version: | Boost 1.53.0 | Severity: | Problem |
Keywords: | Cc: | mail@… |
Description
Hi, I defined some options:
optionsDescription.add_options() .... ("output-file,o", program_options::value<std::string>(), "Result file") ....;
Now, when I start my program without an argument (e.g. ./myprog -o) the error message says:
the required argument for option '--file' is missing
instead of
the required argument for option '--output-file' is missing
This worked at least with version 1.48.
Attachments (1)
Note:
See TracTickets
for help on using tickets.
I can reproduce this issue with boost 1.53.
Using a small example (cf. attachment):
Where the options are defined as: