In computer science, a collection of subroutines and functions stored in one or more files, usually in compiled form, for linking with other programs. Libraries are one of the earliest forms of organised code reuse. They are often supplied by the operating system or software development environment to be used in many different programs. The routines in a library may be general purpose or designed for some specific function such as graphics.
Libraries are linked with the user's program to form a complete executable. The linking may be static linking or dynamic linking.