dropt 1.1.0

May 6, 2012 at 1:40 pm (PT) in Programming

I’m releasing dropt 1.1.0 today.

dropt is a C library for parsing command-line options. Yes, there are a lot of existing ones already, but I wasn’t satisfied with those that I had come across:

  • getopt: The granddaddy of option parsers, getopt uses global variables with funny names and with confusing semantics. There are various implementations of it with different features, licensing terms, degrees of portability, and levels of quality. getopt traditionally handles short and long options in a disjoint manner (if the implementation even handles both).
  • popt: popt has a friendly license, but it has external dependencies (gettext). It’s designed for POSIX systems (but is available on Windows as part of GnuWin32). It is feature-rich, but consequently I think that it’s overly complicated for typical needs.
  • getoptpp: This is C++-only and is licensed under the GPL.
  • Boost.program_options: This has friendly licensing terms, but it’s C++-only.
  • GNU argp and the glib GOption parser: In truth, these might have satisfied me if I had been familiar with them years ago when I started work on dropt. However, even as LGPL libraries, they’re still more restrictive than I like.

dropt solves my complaints about portability, licensing, and hopefully ease-of-use. It’s intentionally not feature-rich, but I think that it provides functionality suitable for most cases.

Command-line option parsing has never been sexy, especially in this modern era of keyboard-less tablet computers, but if you happen to be writing an application that takes command-line options, perhaps give dropt some consideration.

Feedback is appreciated as always.

Newer: Ink doodles
Older: 8 years at VMware

No Comments Yet »

RSS feed for comments on this post.

Leave a comment

(will never be displayed)


Allowed HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>