views:

46

answers:

1

Hello,

I have a framework that uses Boost and CgiCC in the core application and in its interface.

How should I version the library binary interface (a.k.a. libtool -version-info)?

I have no problems tracking the changes in library itself when I make various changes. As it is clear for me how should I version.

But...

Both Boost and CgiCC libraries do not provide any backward compatible API/ABI and my library may be linked with quite arbitrary versions Boost and CgiCC so I can't provide any promise about the interfaces, so I can't really specify -version-info because even the same library compiled against different versions of Boost and CgiCC would not be compatible.

So... What should I do? How should I version library?

I know that I should not depend on Boost and CgiCC interfaces in first place, but this is what I get so far for existing stable version. This issue is addressed in next major release but I still have and want to maintain current release as it is very valuable.

+1  A: 

Consider adopting a versioning scheme like:

http://apr.apache.org/versioning.html

If you expose a dependant libraries API through yours then your must increment your major version number if the dependant library's api changes in a non-backward compatible way. A better strategy is to not expose the internal dependant library at all. If you do need to expose some sort of API then wrap it and abstract away the unstable dependant library.

Brendan Heywood
1st. APR is much more stable then Boost that releases incompatibe versions verery few month. Also it limits you to specific version. Additional issue that under ELF platforms it is quite impossible not to expose dependent library. Even if you do not use it in interface.
Artyom