Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a runtime API for version information #1531

Open
bstarynk opened this issue Feb 27, 2024 · 1 comment
Open

add a runtime API for version information #1531

bstarynk opened this issue Feb 27, 2024 · 1 comment

Comments

@bstarynk
Copy link

bstarynk commented Feb 27, 2024

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.

@BillyDonahue
Copy link
Contributor

BillyDonahue commented Feb 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants