### Set application version in gengetopt config based on Mercurial revision

Previously I wrote about gengetopt tool to parse command line arguments. There was a line about application version.

version "13.10.25"


### Command line arguments in C and C++ with gengetopt

Gengetopt is a tool for parsing command line arguments in C and C++ applications. It generates cmdline.c and cmdline.h files in pure C, which contain parser, helper functions, error handling and structure to store argument values. Arguments to be included in auto-generated file are defined in config. I usually gengetopt config file as cmdline.ggo. In this note I provide an example of gengetopt config file and arguments usage in code.