Boost C++ Libraries: Ticket #7256: wrong error message for program options with dashes https://svn.boost.org/trac10/ticket/7256 <p> Hi, I defined some options: </p> <pre class="wiki">optionsDescription.add_options() .... ("output-file,o", program_options::value&lt;std::string&gt;(), "Result file") ....; </pre><p> Now, when I start my program without an argument (e.g. ./myprog -o) the error message says: </p> <p> the required argument for option '--file' is missing </p> <p> instead of </p> <p> the required argument for option '--output-file' is missing </p> <p> This worked at least with version 1.48. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7256 Trac 1.4.3 Georg Sauthoff <mail@…> Sun, 19 Jan 2014 17:52:14 GMT version changed; cc set https://svn.boost.org/trac10/ticket/7256#comment:1 https://svn.boost.org/trac10/ticket/7256#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">mail@…</span> added </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.50.0</span> → <span class="trac-field-new">Boost 1.53.0</span> </li> </ul> <p> I can reproduce this issue with boost 1.53. </p> <p> Using a small example (cf. attachment): </p> <pre class="wiki">./minipo --foo-1 dd terminate called after throwing an instance of 'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;boost::program_options::invalid_option_value&gt; &gt;' what(): the argument ('dd') for option '--1' is invalid </pre><p> Where the options are defined as: </p> <pre class="wiki">./minipo --help Options: --help this help screen --foo-1 arg foo --bar-2 arg bar </pre> Ticket Georg Sauthoff <mail@…> Sun, 19 Jan 2014 17:53:24 GMT attachment set https://svn.boost.org/trac10/ticket/7256 https://svn.boost.org/trac10/ticket/7256 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">minipo.cc</span> </li> </ul> <p> minimal example </p> Ticket