Are there any good configuration file reading libraries for C\C++ that can be used for applications written on the linux platform. I would like to have a simple configuration file for my application. At best i would like to steer clear of XML files that might potentially confuse users.
The vast majority of Linux config files can be found in the /etc/ directory or a sub-directory. Most of the time these configuration files will be edited through the command line, so get comfortable with applications like Nano or Vi.
To edit any config file, simply open the Terminal window by pressing the Ctrl+Alt+T key combinations. Navigate to the directory where the file is placed. Then type nano followed by the filename that you want to edit. Replace /path/to/filename with the actual file path of the configuration file that you want to edit.
A CFG file is a generic preference file that stores settings and configuration information. It is used by various programs, which means different CFG files may store data in different formats. CFG files typically should not be opened manually but may be saved in a text format that can be viewed in a text editor.
Libconfig is a simple library for manipulating structured configuration files. This file format is more compact and more readable than XML. And unlike XML, it is type-aware, so it is not necessary to do string parsing in application code. Website: https://hyperrealm.github.io/libconfig/
I would recommend 'libconfig'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With