[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LINK Linking with Microsoft LINK version 3.65
Syntax: LINK [<object file>[+<object file>...][,[<executable
file>]][,[<map file>]][,[<library file>[+<library
file>...]]] [<options>] [;]/@<response file>
Arguments: <object file> is the name of the object file to
link. If not specified, the default extension is .OBJ.
If a list of object files is specified, separate each
file with a (+) or space character.
Note: The first object file linked must be
Clipper-compiled. Any others compiled by another
compiler must be listed subsequently.
<executable file> is the name of the output file. If
not specified, the default extension is .EXE.
<map file> is the name of the file to output a
listing of symbols, addresses, and segment lengths. The
default extension is .MAP.
Note: In addition to file names, you can specify a
device as output. For example, you can specify PRN and
the output will be directed to the printer. If no <map
file> is specified, output is automatically directed to
the NUL device.
<library> is the name of a runtime libraries searched
to resolve external references in order to link the
specified object files. The default extension is .LIB.
If CLIPPER.LIB is not specified, LINK looks for it by
default.
If no drive or directory is specified, LINK searches for
the library as follows:
. The current drive and directory
. Other paths specified in the list of libraries in the
order specified
. The path specified in the DOS environmental variable
LIB
Note: EXTEND.LIB must be specified to link object
modules from it.
<response file> is the name of a file containing a
list of arguments and options to submit to LINK as if
they were responses to interactive prompts or on the
command line. The contents must conform to following
rules:
. Responses must be in the same order as specified on the
command line
. Responses must begin on a new line or be separated by
commas
. Long responses can span a new line if continued with a
plus (+) character
. A semi-colon (;) uses the default responses for the
remaining prompts
Note: <response file> may occur anywhere within a
LINK command line.
; uses the default for the remainder of response
arguments.
Options: LINK supports a number of options that modify its basic
behavior. Options can be specified on the command line,
at an interactive prompt, or within a response file.
Each option specified must begin with a slash character
(/) and can be abbreviated. The specifications detailed
below give the minimum abbreviation for each option.
Numeric arguments can either be decimal, octal, or
hexadecimal values according to the following special
rules:
. Octal: Any number beginning with zero is treated as
an octal value.
. Hexadecimal: Any number beginning with 0X is
treated as a hexadecimal value. For example, 0XA is 10
decimal.
LINK environmental variable: When LINK executes, it
first searches the environment for the variable LINK. If
it exists, the linker uses the contents for the default
set of options. Where there are conflicts between
options specified on the command line and in the contents
of the LINK environmental variable, the conflicting
command line options supersede the variable's options.
/B[ATCH]
Suppresses automatic prompting for path name if a library
or object file cannot be found.
/CO[DEVIEW]
Creates an output file with instructions needed by
Microsoft CodeView.
/CP[ARMXALLOC]:<16-byte paragraphs>
Sets the maximum number of 16-byte paragraphs needed when
an executable file is loaded into memory in decimal
increments. The default is 65,535.
/DO[SSEG]
Forces segments to be ordered in the Microsoft
language-ordering convention.
/DSALLOCATE
Loads DGROUP data at the high-end of the data segment.
/E[XEPACK] <executable file> <pack file>
Packs repetitive sequences of bytes optimizing the
relocation table.
Note: A packed executable file cannot be viewed with
either SYMDEB or CodeView.
/FA[RCALLTRANSLATION]
Used with /PACKCODE to optimize intra-segment calls.
/HE[LP]
Lists all LINK options to the current device.
/I[NFORMATION]
Displays phase of linking and object file names when
linked.
/LI[NENUMBERS]
Adds the line numbers and addresses of object module
statements to the .MAP file. If no .MAP file is
specified, this option creates a map file using the base
name of the main object file and the .MAP extension to
form the filename.
/M[AP] [:<number>]
Lists all public symbols in the object file to the .MAP
file. If no .MAP file is specified, this option creates
a map file using the base name of the main object file
and the .MAP extension to form the filename.
<number> specifies the number of public symbols to
sort by address if the default number of public symbols
exceeds 2048. If this option is not specified, the
listing is sorted by name.
/NOD[EFAULTLIBRARYSEARCH]
Forces LINK to ignore any library references inserted
into the object file by the compiler.
Note: The Clipper compiler inserts a reference to
CLIPPER.LIB in each .OBJ file it creates.
/NOE[XTDICTIONARY]
Forces LINK not to use the extended dictionary when
searching libraries. If this option is not specified,
LINK may return error L2044 if symbols are redefined such
as the names of standard library routines.
Note: This option is available only in LINK versions
3.6 and above.
/NOF[ARCALLTRANSLATION]
Suppresses the FARCALLTRANSLATION which is the default
state.
/NOI[GNORECASE]
Forces LINK to differentiate upper and lower case letters
in external names. This option is important if you are
linking C object files, since C is case sensitive and
some external names may not be found.
/NOP[ACKCODE]
Suppresses /PACKCODE.
/PAC[KCODE] [:<number>]
Use with /FARCALLTRANSLATION to pack code segments into
64K areas.
/PAU[SE]
Forces LINK to pause and prompt for a change of disk
drive prior to writing the executable file.
/SE[GMENTS]:<number>
Sets the maximum <number> of segments per program. The
<number> can be any integer from one to 3072. The option
is used to override the default limit of 128 segments.
Note: <number> may be specified as either a decimal,
hexadecimal, or octal value.
/ST[ACK]:<bytes>
Sets the size of the executable file stack to <bytes> in
the range of 1 to 65,535. The default stack size for C
programs is 2048.
Note: <bytes> may be specified as either a decimal,
hexadecimal, or octal value.
----------------------------------- Example -------------------------------
The following LINK instructions produce an executable file named
TEST.EXE, where TEST and PROG1 are object files and \CLIPPER\CLIPPER
is the Clipper library, located in the Clipper subdirectory.
C>LINK TEST + PROG1,,,\CLIPPER\CLIPPER/SE:256
.
Online resources provided by: http://www.ClipX.Net --- NG 2 HTML conversion by Dave Pearson