SLAU131V October 2004 – February 2020
To invoke the archiver, enter:
ar430[-]command [options] libname [filename1 ... filenamen] |
ar430 | is the command that invokes the archiver. | |
[-]command | tells the archiver how to manipulate the existing library members and any specified. A command can be preceded by an optional hyphen. You must use one of the following commands when you invoke the archiver, but you can use only one command per invocation. The archiver commands are as follows: | |
@ | uses the contents of the specified file instead of command line entries. You can use this command to avoid limitations on command line length imposed by the host operating system. Use a ; at the beginning of a line in the command file to include comments. (See Example 1 for an example using an archiver command file.) | |
a | adds the specified files to the library. This command does not replace an existing member that has the same name as an added file; it simply appends new members to the end of the archive. | |
d | deletes the specified members from the library. | |
r | replaces the specified members in the library. If you do not specify filenames, the archiver replaces the library members with files of the same name in the current directory. If the specified file is not found in the library, the archiver adds it instead of replacing it. | |
t | prints a table of contents of the library. If you specify filenames, only those files are listed. If you do not specify any filenames, the archiver lists all the members in the specified library. | |
x | extracts the specified files. If you do not specify member names, the archiver extracts all library members. When the archiver extracts a member, it simply copies the member into the current directory; it does not remove it from the library. | |
options | In addition to one of the commands, you can specify options. To use options, combine them with a command; for example, to use the a command and the s option, enter -as or as. The hyphen is optional for archiver options only. These are the archiver options: | |
-h | provide command-line help | |
-q | (quiet) suppresses the banner and status messages. | |
-s | prints a list of the global symbols that are defined in the library. (This option is valid only with the a, r, and d commands.) | |
-u | replaces library members only if the replacement has a more recent modification date. You must use the r command with the -u option to specify which members to replace. | |
-v | (verbose) provides a file-by-file description of the creation of a new library from an old library and its members. | |
libname | names the archive library to be built or modified. If you do not specify an extension for libname, the archiver uses the default extension .lib. | |
filenames | names individual files to be manipulated. These files can be existing library members or new files to be added to the library. When you enter a filename, you must enter a complete filename including extension, if applicable. |
NOTE
Naming Library MembersIt is possible (but not desirable) for a library to contain several members with the same name. If you attempt to delete, replace, or extract a member whose name is the same as another library member, the archiver deletes, replaces, or extracts the first library member with that name.