6

Boost::Program_Optionsのデフォルトの構文は「--DEVICEiphone」です。構文「-DEVICE:iphone」または「-DEVICE = iphone」をサポートするにはどうすればよいですか?

4

1 に答える 1

5

Boost.Program_Optionsには、かなりの数のオプションスタイルがあります。あなたが目指していると思われる特定の組み合わせは次のようになります。

command_line_style::long_allow_adjacent |
command_line_style::short_allow_adjacent |
command_line_style::allow_long_disguise

これらのオプションはstyle、コマンドラインパーサーの機能に指定する必要があります。

    po::store(po::command_line_parser(argc, argv).style(<your styles here>).run(), vm);
于 2011-08-02T04:36:53.507 に答える