The error is "option is ambiguous and matches 'parent_run' and 'parent_hierarchy' " instead it should be "option '-parent' is ambiguous and matches '-parent_run' and '-parent_hierarchy' " Here since -parent is canonical name and it set to NULL string , it is giving the first error message. I have checked the canonical name using get_canonical_name function.
Below is the code snippet.
catch(boost::program_options::error& e){
std::cout<<e.what();
}
The error is "option is ambiguous and matches 'parent_run' and 'parent_hierarchy' " instead it should be "option '-parent' is ambiguous and matches '-parent_run' and '-parent_hierarchy' " Here since -parent is canonical name and it set to NULL string , it is giving the first error message. I have checked the canonical name using get_canonical_name function. Below is the code snippet. catch(boost::program_options::error& e){ std::cout<<e.what(); }