Libraries are compiled, error-free (ideally - but not always - for example the heartbleed vulnerability in OpenSSL) pieces of software, written by expert programmers. They contain routines which perform common tasks, such as sorting or searching. A "loader" program handles the addresses within the library when the program is run. Libraries can be written in a different language to the language the programmer is using, however if this is the case then a "linker" program needs to be use.
Using a library helps programmers because:
- They save time (and therefore money) because they are readily available.
- They have already been tested, and so theoretically should be error-free.
- A library can be written in a different language (to the main program).
- Programmers can use the expertise of others.