A cross-platform C library for parsing command-line arguments


I’m looking for a command-line argument parsing C library, with…

Required features:

  1. Cross-platform (at least Linux, Windows, Mac)
  2. Gratis
  3. Libre
  4. Maintained
  5. Relatively high-level (i.e. I don’t have to write my own loop going over arguments)
  6. 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:

  1. Support for subcommands
  2. Not based on heavy use of macro



Source link

Related Posts

About The Author

Add Comment