#StackBounty: #macos #cmake #mach-o Library versioning on Mach-O platforms

Bounty: 400

I was looking at versioning a shared library for a small personal project when the docs for the SOVERSION target property mentioned that on Mach-O systems such as OS X and iOS, it corresponds to the “compatibility version”, while VERSION corresponds to the “current version”.

On Linux, it’s simply something like VERSION 5.4.2 and SOVERSION 5 to indicate that the library is compatible with version 5.0 and newer, and VERSION is used as the DLL image version in the form <major>.<minor> on Windows (I’m not sure what difference SOVERSION makes on Windows).

However, the example in the docs for the referenced FRAMEWORK target property illustrate how you might have VERSION 16.4.0 and SOVERSION 1.0.0 on Mach-O platforms (I’m not interested in building a framework, just wondering about the foreign versioning scheme.)

Just how does versioning work in the Mach-O world? I’m used to just bumping the major version if I remove some functionality, which would be a compatibility break, so how is it possible that a library at version 16.4.0 remains compatible with the 1.0.0 version of the library? What does “compatible” mean?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.