Ar (Unix) - Your Art History Reference Guide!

ArtHistoryClub Information Site on Ar (Unix) Art History Art History Search        Art History Browse welcome to our free resource site for all art history lovers!
Art History Search        Art History Browse             News        Gallery        Forums        Articles        Weblinks        welcome to our free resource site for all art history lovers!

Ar (Unix)

The archiver (also known simply as ar) is a UNIX utility that maintains groups of files as a single archive file. Generally, ar is used to create and update library files that the link editor or linker uses; however, it can be used to create archives for any purpose. ar is included as one of the GNU Binutils.

For example, to create an archive from files class1.o, class2.o, class3.o, the following command would be used:

ar rcs libclass.a class1.o class2.o class3.o

to compile a program that depends on class1.o, class2.o, and class3.o one could do:

cc main.c -L. -lclass

instead of:

cc main.c class1.o class2.o class3.o 

The -L and -l switches instruct the linker to look for the library "libclass.a" in the current directory.

See also

External links

Last updated: 06-01-2005 01:40:48
Last updated: 01-04-2007 01:18:57
The contents of this article are licensed from Wikipedia.org under the
GNU Free Documentation License. See original document.
Art History Search | Art History Browse | Contact | Legal info