[Insight-developers] Shared libs on Mac

Brad King brad.king at kitware.com
Fri Mar 25 15:04:42 EDT 2011


On 03/25/2011 02:46 PM, Bill Lorensen wrote:
> I don't know. Some time ago, we changes the lookup suffix for shard libs
> on the mac from .so to  .dylib. After modularization, it seems to be .so.
> 
> Do the other itk shared libs have .so or .dylib?

This is the difference in default name between using add_library with
SHARED v. MODULE.  At one time on the mac there was a distinction between
linkable libraries (.dylib) and loadable modules (.so) that could be
loaded with the predecessor to dlopen.  That is the original reason that
CMake makes a distinction between SHARED and MODULE libraries.  Now we
use it to distinguish linkable shared libraries from plugin modules on
all platforms.

If you remember in a note I sent recently about these two forms I commented
that I could not remember why we used SHARED in ITK.  Well, one reason is
the dynamic loader. ;)

I think the dynamic loader should support both extensions.

-Brad K


More information about the Insight-developers mailing list