Using the LINK32 -LIB CommandLast reviewed: July 20, 1995Article ID: Q100084 |
The information in this article applies to:
SUMMARYThe text below presents the LINK32 librarian, its command line options, and how to use the utility. This information differs somewhat for the FORTRAN PowerStation 32 for Windows NT linker, LINK. Please see the documentation for that product for more details.
MORE INFORMATIONLINK32.EXE performs several functions, specified by one of the following command-line options:
-LINK Create an executable file (linking) -LIB Create or modify a library (librarian) -DUMP Display information about a libraryThe LINK32 librarian is a fairly simple tool that adds, removes, and extracts COFF object files from libraries. The LINK32 -LIB options are as follows:
-DEBUGTYPE:{COFF|CV|BOTH} Do not use -DEF:[filename] Create an import library -EXTRACT:membername Extract an object file from a library -LIST List object files in a library -MACHINE:i386 Required with the -DEF option, not used otherwise -OUT:filename Specifies library name -REMOVE:membername Remove object module from library -SUBSYSTEM Do not use -VERBOSE Do not useThe following examples demonstrate using these options to perform common library management tasks.
Example #1To build the library TEST.LIB that contains the modules A.OBJ and B.OBJ, use the following command line:
LINK32 -LIB -OUT:TEST.LIB A.OBJ B.OBJ Example #2To modify the existing library TEST.LIB to add the modules A.OBJ and B.OBJ, use the following command line:
LINK32 -LIB TEST.LIB A.OBJ B.OBJ Example #3To create a file that lists the object modules in a library, use the following command line:
LINK32 -LIB -LIST TEST.LIB >TEST.LSTThis command line generates a listing that contains the names of the object files in the library; the listing does not list the routines in each object file. To retrieve this information, use the -DUMP option.
Example #4To update a library with a new version of an object module, use the following command lines:
LINK32 -LIB TEST.LIB -REMOVE:A.OBJ LINK32 -LIB TEST.LIB A.OBJNo single command can do this. Avoid the following commands:
LINK32 -LIB TEST.LIB A.OBJ !if A.OBJ is in TEST.LIB LINK32 -LIB TEST.LIB A.OBJ -OUT:TEST.LIB LINK32 -LIB TEST.LIB -REMOVE:A.OBJ A.OBJNOTE: Modules cannot be added to a library which has had all of the modules removed. NOTE: The object module specified by -REMOVE:obj_name must have the same case as shown by:
LINK32 -LIB -LISTIn other words, -REMOVE is case sensitive.
|
Additional reference words: kbinf 1.00 1.00a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |