ABI , DLL , .lib, , .lib, DLL.
" libtool" (http://www.gnu.org/s/libtool/manual/libtool.html#Versioning) - .
, C- ( , " ++" ), .
:
DLL. . libPNG makefile.cygwin:
PNGDLL, new dll , dll. , dll , .
, , , , dll - FORWARD , BACKWARD . cygwin DLL:
1) libtool http://www.gnu.org/software/libtool/manual.html#Versioning:
So, libtool library versions are described by three integers:
current
The most recent interface number that this library implements.
revision
The implementation number of the current interface.
age
The difference between the newest and oldest interfaces that this
. , number current - age to current.
Updating libtool versioning:
1. Start with version information of 0:0:0 for each libtool
.
2. Update the version information only immediately before a
. , , .
3. If the library source code has changed at all since the last
update, then increment revision (c:r:a becomes c:r+1:a).
4. If any interfaces have been added, removed, or changed since the
last update, increment current, and set revision to 0.
5. If any interfaces have been added since the last public release,
then increment age.
6. If any interfaces have been removed since the last public
release, then set age to 0.
Never try to set the interface numbers so that they correspond to the
release number of your package. This is an abuse that only fosters
misunderstanding of the purpose of library versions. Instead, use the
-release flag (see Release numbers), but be warned that every
, .
2) On windows/cygwin, the DLLVER is 'c - a' (trust me, this is correct,
).
, : libtool 5: 4: 3, 4 5, . ( . 5, 4, 3 2 dll 5: 4: 3 ).
, dll. c: r: , .
oldest: interface definition 0, initial release:
0:0:0 (DLLVER = 0)
removed an entry point:
1:0:0 (DLLVER = 1) NOT backwards compatible!
but DLLVER does the right thing.
source code changed, but no added or removed entry points:
1:1:0 (DLLVER = 1)
more source code changes:
1:2:0 (DLLVER = 1)
In all of the previous three releases, 'c' - 'a' = DLLVER = 1.
removed an entry point (or renamed it):
2:0:0 (DLLVER = 2) This is INCOMPATIBLE.
(But look: 'c' - 'a' = 2, so the DLLVER does the right thing)
added a new function:
3:0:1 (DLLVER = 2) (this is BACKWARDS but not FORWARDS compatible.
However, the DLLVER 'c' - 'a' still is 2, so that is good.)
add eight more exported functions all at once
4:0:2 (DLLVER = 2)
add another function:
5:0:3 (DLLVER = 2)
source code changes, but no new interfaces:
5:1:3 (DLLVER = 2)
again:
5:2:3 (DLLVER = 2)
again:
5:3:3 (DLLVER = 2)
again:
5:4:3 (DLLVER = 2)
DLL DLLVER = 2 (2: 0: 0, 3: 0: 1, 4: 0: 2, 5: 0: 3, 5: 1: 3, 5: 2: 3, 5: 3: 3 5: 4: 3) : DLL exe, DLL .
1.2.3 DLLVER 12. , "c" - "a" 12, 'c' = 12 'a' = 0.
[libpng] 1.2.4 - . , libtool 13: 0: 1 - DLLVER 12.