Article ID: 100086
Article Last Modified on 10/2/2003
-LINK Create an executable file (linking) -LIB Create or modify a library (librarian) -DUMP Display information about a libraryThe -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.
-DEBUG:[mapped|notmapped,]{none|minimal|partial|full}
-DEBUG:NONE is the default. If the command line specifies
-DEBUG:NONE or omits the -DEBUG option, LINK32 does not write
any debugging information into the executable file. -DEBUG:FULL
provides the same information as the LINK /CODEVIEW option in
the 16-bit linker.
-DEFAULTLIB:library[,library]
Specifies the alternate method to specify libraries. If the
LINK32 command line includes the -DEFAULTLIB option, separate
the names of successive libraries on the command line with a
comma; otherwise, use a space.
-MAP[:filename]
Specifies map file creation. LINK32 generates map files that
contain brief summary information about the size of code and
data followed by considerable detail about the code modules used
to link the application. The LINK32 -DUMP option provides
similar information.
-OUT:filename
Specifies the name for the executable file.
-STACK:[reserve][,commit]
Specifies the stack size for the executable file.
-VERSION:minor[.major]
Specifies the version number for the executable file (the
default version is 0.0).
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.
LINK32 test.obj libf.lib libc.lib kernel32.lib ntdll.libIf desired, you could specify the libraries in a response file, such as DEFAULT.LRF, that contains the following line:
libf.lib libc.lib kernel32.lib ntdll.libTo specify this response file on the LINK32 command line, use the following syntax:
LINK32 test.obj @default.lrfLINK32 uses the .OBJ filename extension to identify object modules and the .LIB filename extension to identify libraries.
BINDMSF filename.EXEFL32 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:
FL32 file1.obj file2.obj user.libThe LINK32 command line that FL32 generates typically contains the following options when the FL32 command line contains the -Zi option switch:
-out:test.exe Name of the executable file
-debug:none No debugging information (default)
-machine:i386 Intel processor family (386, 486, and so
on) Does not apply only to 386.
-base:0x00010000 Base location (default)
-subsystem:console Targets Windows NT console
-entry:mainCRTStartup Entry point symbolic name (default)
-stack:32768,4096 32K stack reserved, 4K committed
-defaultlib:libf.lib,libc.lib,kernel32.lib,ntdll.lib
Default libraries
-debug:full Include full debugging information
-debugtype:cv4 CodeView-type symbolic information
a.obj
Note that the command line specifies the -DEBUG option twice; the
second specification is correct.
Additional query words: kbinf 1.00 1.00a
Keywords: KB100086