Proposal for a standard for D library naming

Anders F Björklund afb at
Tue Sep 19 01:08:14 PDT 2006

Gregor Richards wrote:

> (This section applies only to UNIX)
> The UNIX convention for naming of libraries is:
> lib<name>.so.<major>.<minor>.<revision>
> with symlinks for each of:
> lib<name>.so.<major>.<minor>
> lib<name>.so.<major>
> and also a symlink of:
> lib<name>.so
> if the library has its headers installed. There is no compelling
> reason to break from this standard, so it is left as such in this
> document.

Not to rain on your parade, but Darwin libraries use:

lib<name>.<major>.<minor>.dylib ->
lib<name>.<major>.dylib ->
lib<name>.dylib ->

So you might want to make the "so" name flexible... ?

Using the -L and -l flags works as expected, though.
(With GDC that is, DMD uses those flags differently)

Everything else applies.

However, most Mac OS X libraries are instead packaged
as "frameworks" which include *both* libs and includes.
(Similar to how the Mac OS X applications are bundled up
as "apps" which include both executables and resources)

Frameworks are linked with the -framework flag, and the
headers are automatically searched for in the system dirs.
Don't think that the D libraries will ever be packaged as
frameworks, so it only applies to libs like OpenGL and SDL.

More information about the Digitalmars-d mailing list