Next: , Previous: , Up: Platform quirks   [Contents][Index]


15.3.5 Archivers

On all known systems, building a static library can be accomplished by running ar cr libname.a obj1.o obj2.o …, where the .a file is the output library, and each .o file is an object file.

On all known systems, if there is a program named ranlib, then it must be used to “bless” the created library before linking against it, with the ranlib libname.a command. Some systems, like Irix, use the ar ts command, instead.