Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good, simple configuration library for large c++ project?

We are developing a rather large project in C++, where many components require configuration parameters. We would like to use a central place to configure everything (like a registry), preferably with a nice and simple GUI (e.g. like Firefox's about:config) and a simple API.

I am pretty sure this that many applications have this kind of problem, but could not find any libraries available that can be readily used for this. Does anyone know of a good (preferably free) library to use for this?

This should work cross platform in Windows and Linux.

like image 424
martinus Avatar asked Apr 30 '09 14:04

martinus


2 Answers

boost::program_options provides unified (and cross platform) support for configuration from command line, environment variables and configuration files. It seems like it ought to scale to multiple bits of a large software system registering an interest in various parameters (e.g option groups). Not much help with the GUI or persistence side of things though (but then what's wrong with editing a config file with a text editor ?).

like image 89
timday Avatar answered Sep 22 '22 12:09

timday


I've used libconfig before, works well easy and LGPL. http://www.hyperrealm.com/libconfig/

like image 26
Marc Lindahl Avatar answered Sep 21 '22 12:09

Marc Lindahl