Description
Most Linux programs want a --version
program option. This is suggested in GNU coding standards.
The jsoncpp library already gives the preprocessor JSONCPP_VERSION_STRING
.
It would be useful to add some runtime function giving the same information (since we have a /usr/lib/x86_64-linux-gnu/libjsoncpp.so
shared library)
My suggestion would be to add some static member in that shared library
const char*Json::Features::version() { return JSONCPP_VERSION_STRING; };
This is inspired by similar API in GNU libc, Qt, GTK, .... and enables a program using jsoncpp to display the version information of the runtime linked shared library, or perhaps to check at runtime that the version of the shared library is compatible with what the program expects.
We are using jsoncpp in the RefPerSys open source inference engine project.
Regards from Basile Starynkevitch in France.