Determine library version?
-
10-12-2019 - |
Question
I compiled a program with a static library libpolarssl.a
I would like to create a README
with the library version.
Is there a programmatic way to get the version of this library?
Solution 2
I ended up writing a a script to do this
vr ()
{
printf "#include <$2>\n$1" > a.c
read $1 < <($CC -E a.c | sed '$!d; s/"//g')
}
vr POLARSSL_VERSION_STRING polarssl/version.h
OTHER TIPS
Polar SSL has an internal version number and the wrappers to export it to your application, see:
http://polarssl.org/apidoc/version_8h.html
// Get the version number
unsigned int version_get_number(void);
// Get the version string ("x.y.z")
void version_get_string(char *string);
// Get the full version string ("PolarSSL x.y.z")
void version_get_string_full(char *string);
Easy right?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow