I’m looking for a command-line argument parsing C library, with…
Required features:
- Cross-platform (at least Linux, Windows, Mac)
- Gratis
- Libre
- Maintained
- Relatively high-level (i.e. I don’t have to write my own loop going over arguments)
- Featureful, e.g.:
- Generates usage info
- Can leaves out unparsed options for further use after parsing what it knows about
- Supports both positional and non-positional parameters
- Supports both –foo=bar and –foo bar
- Support parameters appearing multiple times, with overriding and with aggregations into sequenced
- Supports parameter name aliases, including both a single-letter and long-form aliases for the same parameter
Desired feautres:
- Support for subcommands
- Not based on heavy use of macro