File Naming
- Most modern Unix-like systems
- The system stores
libfoo.a
andlibfoo.so
files in directories such as/lib
,/usr/lib
or/usr/local/lib
. The filenames always start withlib
, and end with.a
(archive, static library) or.so
(shared object, dynamically linked library). Some systems might have multiple names for the dynamically linked library, with most of the names being names for symbolic links to the remaining name; those names might include the major version of the library, or the full version number; for example, on some systemslibfoo.so.2
would be the filename for the second major interface revision of the dynamically linked librarylibfoo
. The.la
files sometimes found in the library directories are libtool archives, not usable by the system as such.
- Mac OS X
- The system inherits static library conventions from BSD, with the library stored in a
.a
file, and can use.so
-style dynamically linked libraries (with the.dylib
suffix instead). Most libraries in Mac OS X, however, consist of "frameworks", placed inside special directories called "bundles" which wrap the library's required files and metadata. For example, a framework calledMyFramework
would be implemented in a bundle calledMyFramework.framework
, withMyFramework.framework/MyFramework
being either the dynamically linked library file or being a symlink to the dynamically linked library file inMyFramework.framework/Versions/Current/MyFramework
.
- Microsoft Windows
- Dynamically linkable libraries usually have the suffix
*.DLL
, although other file name extensions may be used for specific purpose dynamically linked libraries, e.g.*.OCX
for OLE libraries. The interface revisions are either encoded in the file names, or abstracted away using COM-object interfaces. Depending on how they are compiled,*.LIB
files can be either static libraries or representations of dynamically linkable libraries needed only during compilation, known as "Import Libraries". Unlike in the UNIX world, where different file extensions are used, when linking against.LIB
file in Windows one must first know if it is a regular static library or an import library. In the latter case, a.DLL
file must be present at run time.
Read more about this topic: Library (computing)
Famous quotes containing the words file and/or naming:
“Probably nothing in the experience of the rank and file of workers causes more bitterness and envy than the realization which comes sooner or later to many of them that they are stuck and can go no further.”
—Mary Barnett Gilson (1877?)
“Husband,
who am I to reject the naming of foods
in a time of famine?”
—Anne Sexton (19281974)