The information in this article applies to:
SUMMARY
The text below presents the LINK32 linker, its command line options,
and how to use the utility.
MORE INFORMATIONLINK32.EXE performs several functions, specified by one of the following command-line options:
The -LINK option directs LINK32 to create an executable file.
Specifying the -LINK option is not required; creating an executable
file from object modules is the utility's default behavior.
LINK32 supports wildcard characters to specify object modules. This behavior is different from that of previous versions of LINK. The LINK32 -LINK options are as follows:
When you create a LINK32 command line, modify only the options listed
above. Specify any other option on the FL32 command line exactly as
provided in the documentation.
Do not use the following options: ALIGN, BASE, DEBUGTYPE, NODEFAULTLIB, DLL, ENTRY, FIXED, FORCE, NOPACK, GPSIZE, HEAP, INCLUDE, MACHINE, ORDER, ROM, SECTION, STUB, SUBSYSTEM, and VERBOSE. Note: The Build Tools Help file in the Visual Workbench version 1.0 provides additional information about LINK32. However, this file does not list all the available options and it contains errors in the description of the DEBUG option. This article provides the most current information about LINK32 -LINK. The syntax to specify a response file is the same as that used by Microsoft LINK for MS-DOS: LINK32 @<responsefilename>. To add an additional object module, specify it on the same line as the existing object modules (with a space character separating the names) or specify it on the line following the existing object modules. The minimum LINK32 command line requires only the list of object modules and libraries, as follows:
If desired, you could specify the libraries in a response file, such
as DEFAULT.LRF, that contains the following line:
To specify this response file on the LINK32 command line, use the
following syntax:
LINK32 uses the .OBJ filename extension to identify object modules and
the .LIB filename extension to identify libraries.
LINK32 automatically converts OMF (Intel object module format) object modules to COFF object modules during the linking process if and only if the OMF files contain 32-bit flat memory model object code. For example, Microsoft Macro Assembler (MASM) version 6.1 creates OMF object files. LINK32 can directly process a 32-bit flat memory model file from MASM 6.1; the CVTOMF.EXE utility is not required. When linking from the command line (separate from a compilation), you must manually run the bind utility from the command line:
FL32 spawns the bind utility as part of a compilation; LINK32 does not.
FL32 provides an easy method to link from the command line because it
generates all required options and default library names. It also
recognizes the .LIB and .OBJ filename extensions and acts appropriately.
For example, the following FL32 command line links the two object modules
with the library and binds the result:
The LINK32 command line that FL32 generates typically contains the
following options when the FL32 command line contains the -Zi option
switch:
Note that the command line specifies the -DEBUG option twice; the
second specification is correct.
Additional query words: kbinf 1.00 1.00a
Keywords : |
Last Reviewed: November 2, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |