I just integrated libconfuse with my project, and I am very pleased with it.
It has a very nice balance of features and simplicity, and was very ease to use.
I did find it useful to change cfg_include, so that paths are constructed
relative to the file containing the include directive, see below.
DLLIMPORT int cfg_include(cfg_t *cfg, cfg_opt_t *opt, int argc,
const char **argv)
opt = NULL;
if (argc == 1)
const char * arg = argv;
int res = 0;
// If the argument does not begin with / or ~ (not an absolute path),
// construct a path relative to the current filename.
if (!strspn(arg, "~/") && strchr(cfg->filename, '/'))
char * tmp = malloc(strlen(cfg->filename) + strlen(arg));
strcpy(strrchr(tmp, '/') + 1, arg);
arg = tmp;
res = cfg_lexer_include(cfg, arg);
if (arg != argv) free(arg);
cfg_error(cfg, _("wrong number of arguments to cfg_include()"));