Ar (Unix) Guide, Meaning , Facts, Information and Description
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.oto compile a program that depends on class1.o, class2.o, and class3.o one could do:
cc main.c -L. -lclassinstead of:
cc main.c class1.o class2.o class3.oThe -L and -l switches instruct the linker to look for the library "libclass.a" in the current directory.
This is an Article on Ar (Unix). Page Contains Information, Facts Details or Explanation Guide About Ar (Unix) See also
External links
