There's no standard version-numbering scheme, but it should be readily apparent how "serious" the changes are from one version to the next. Normally source changes that don't overtly change the behavior of the code (i.e. they refine it or debug it instead) would cause a change toward the end of the version number, e.g. from 1.1.0 to 1.1.1. An interface change such as the removal or modification of a function's declaration would cause a change somewhere earlier in the version number, e.g. 1.1.0 to 1.2.0. This serves as a visual indication that code developed with the old library might require some modification to work with the new one. A complete overhaul, such as a change in naming conventions, would be the most significant of all changes, thereby changing the left-most portion of the version, e.g. 1.1.0 to 2.0.0.
Above is a general pattern many developers use, though some systems are quite a bit more complex and denote parallelisms in versions. The kernel, for example, uses a version with an odd-valued second number (e.g. 2.5.x) to denote that it's experimental, then changes that number to even (e.g. 2.6.x) when it's stable, but concurrently maintains two separate versions at one time: one stable and one experimental.
You can make the version available to the using programs by using a global
extern const char* that's defined within the source of your library, or you can create a macro in a header that the using programs will include. I find that both is the best thing to do.
Some systems use a set of independent numbers that aren't necessarily in the order of their importance. For example, a library might use x.y.z where x is the interface version, y is the source code version, and z is the build version.
It really just depends on what you want to communicate to your users through the version number alone. You want to be able to answer the most frequent and simple questions through the use of a logical and consistent numbering scheme. The most obvious questions
I'd want answered are:
- Can I use it with my previously-linked binary code?
- If not, can I just recompile the old code with the new headers to incorporate the changes?
- Should I even bother upgrading from version x?
- Will I spend numerous hours making changes to my existing code?
Your users might have been asking about the state of the code, such as alpha, beta, release, etc. These terms should be used as an indication of how much the user should count on any given version. For example, I "reserve the right" to make any and all changes to interfaces and behaviors from one alpha version to the next because I haven't yet figured out how best to implement everything. Beta versions are a bit more stable, but are still susceptible to a complete rewrite when the release version comes along.
ta0kira