Question

I'm poking around in the SDKs, trying to understand what's actually included.

I noticed that dylibs sometimes ship in multiple versions, e.g.

ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib
...
libBSDPClient.A.dylib
libBSDPClient.dylib
...
libSystem.B.dylib
libSystem.dylib
...

What are these .A and .B versions for? Who is using what?

Was it helpful?

Solution

The A and B etc denote an API version. The reason you're seeing two of each is because the non versioned (e.g. libSystem.dylib) is , in fact, a symbolic link (read:shortcut, alias) to the versioned one. you can see that if you do ls -F (and see @s for links) or ls -l ( and see the ->, e.g.

lrwxr-xr-x@ 1 root wheel 21 Aug 4 19:59 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/libBSDPClient.dylib -> libBSDPClient.A.dylib

So there's nothing much to worry about here. Basically, if there is ever a newer version, you can simply link to it instead of the older one (using ln -s). This is an old UN*X trick, not just in Mac OS (also used in Linux on .so files). Most are version A, btw. libSystem, though , is B (it's been modified quite a bit since the inception of OS X)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top