There is no general topic on how to encode the version number in a static library.
Sometimes there is no one at all. Sometimes this is done using a header belonging to this library. Sometimes this is done using a function that returns such information. In some cases, this static library is part of a pseudo-structure that contains a plist, which may contain the correct version number.
Remember that a static library alone is not much more than a bunch of object files placed in a file archive. There is hardly any additional information, not metadata.
source share