# include # include int main(int argc, char * argv[]) try { using namespace boost::program_options; options_description desc("Options"); desc.add_options() ("foo", "foo") ("foo-bar", "foo-bar") ; parsed_options parsed = parse_command_line(argc, argv, desc); variables_map vm; store(parsed, vm); notify(vm); } catch (std::exception & ex) { std::cerr << argv[0] << ": " << ex.what() << std::endl; return EXIT_FAILURE; }