Libtool version for the library, which depends on other libraries

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

How can I change the binary interface of the library (aka libtool -version-info )?

I have no problem tracking changes in the library itself when making various changes. How it is clear to me how I should be a version.

But...

Both Boost and CgiCC libraries do not provide backward compatible API / ABI, and my library can be associated with completely arbitrary versions of Boost and CgiCC, so I can not provide any promise about the interfaces, so I can not specify -version-info exactly because even the same library compiled for different versions of Boost and CgiCC will not be compatible.

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

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

+4
source share
2 answers

Consider using a version control scheme, for example:

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

If you expose the API of dependent libraries through yours, then your should increase your main version number if the dependent api library does not change in the opposite way. The best strategy is not to expose the internal dependent library at all. If you need to expose some kind of API, then wrap it and distract the unstable dependent library.

+1
source

-version-info does not use this or that version of the majority fix (which is for -release for), but it must adhere to the numbering scheme described in http://www.gnu.org/software/libtool/manual/html_node/Versioning.html (whole chapter).

+1
source

Source: https://habr.com/ru/post/1307222/


All Articles