Skip to content

add a runtime API for version information #1531

Open
@bstarynk

Description

@bstarynk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions