cstatic-librariespolarssl

Determine library version?


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

  • 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