📄 tutmain.gml
字号:
.*
.*
.im dosfiles
.*
.chap *refid=tutchap Linking Executable Files for Various Systems
.*
.np
.ix '&lnkcmdup' 'command line format'
.ix '&lnkcmdup command line' 'invoking &lnkcmdup'
.ix 'command line format' '&lnkcmdup'
.ix 'invoking &lnkname'
The &lnkname command line format is as follows.
.mbigbox
&lnkcmd {directive}
.embigbox
.np
where
.bi directive
is a series of &lnkname directives specified on the command line or in
one or more files.
If the directives are contained within a file, the "@" character is
used to reference that file.
If no file extension is specified, a file extension of "lnk" is
assumed.
.exam begin
&lnkcmd name testprog @first @second option map
.exam end
.np
In the above example, directives are specified on the command line
(e.g., "name testprog" and "option map") and in files (e.g.,
.fi first.lnk
and
.fi second.lnk
.ct ).
.*
.section Using the SYSTEM Directive
.*
.np
.ix 'SYSTEM directive'
For each executable file format that can be created using the
&lnkname, a specific SYSTEM directive may be used.
The SYSTEM directive selects a subset of the available directives
necessary to create each specific executable file format.
.begnote
.notehd1 System
.notehd2 Description
.note com
16-bit x86 DOS ".COM" executable
.note dos
16-bit x86 DOS executable
.note dos4g
32-bit x86 DOS/4GW executable
.note dos4gnz
non-zero based 32-bit x86 DOS/4GW executable
.note netware
32-bit x86 NetWare Loadable Module. Uses original Novell developer kit
(NOVH + NOVI). This is a legacy system type. It is recommended to
use one of the netware_clib or netware_libc system types instead.
.note novell
synonym for "netware". This is a legacy system type. It is recommended to
use one of the netware_clib or netware_libc system types instead.
.note netware_libc
32-bit x86 NetWare Loadable Module. Targetted for Novells LibC based
environment on NetWare 5 and later. Uses the full Open Watcom run-time
library for NetWare.
.note netware_libc_lite
32-bit x86 NetWare Loadable Module. Targetted for Novells LibC based
environment on NetWare 5 and later. Uses the thin Open Watcom run-time
library support for NetWare and consumes C library functionality from
the server libraries.
.note netware_clib
32-bit x86 NetWare Loadable Module. Targetted for Novells traditional
CLIB based environment on NetWare 3 and later. Uses the full Open Watcom
run-time library for NetWare.
.note netware_clib_lite
32-bit x86 NetWare Loadable Module. Targetted for Novells traditional
CLIB based environment on NetWare 3 and later. Uses the thin Open Watcom
run-time library support for NetWare and consumes C library functionality
from the server libraries.
.note os2
16-bit x86 OS/2 executable
.note os2_dll
16-bit x86 OS/2 Dynamic Link Library
.note os2_pm
16-bit x86 OS/2 Presentation Manager executable
.note os2v2
32-bit x86 OS/2 executable
.note os2v2_dll
32-bit x86 OS/2 Dynamic Link Library
.note os2v2_pm
32-bit x86 OS/2 Presentation Manager executable
.note pharlap
32-bit x86 Phar Lap executable
.note tnt
32-bit x86 Phar Lap TNT executable
.note qnx
16-bit x86 QNX executable
.note qnx386
32-bit x86 QNX executable
.note x32r
32-bit x86 FlashTek executable using register-based calling conventions
.note x32rv
32-bit x86 virtual-memory FlashTek executable using register-based calling
conventions
.note x32s
32-bit x86 FlashTek executable using stack-based calling conventions
.note x32sv
32-bit x86 virtual-memory FlashTek executable using stack-based calling
conventions
.note windows
16-bit x86 Windows 3.x executable
.note windows_dll
16-bit x86 Windows 3.x Dynamic Link Library
.note win_vxd
32-bit x86 Windows 3.x or 9x Virtual Device Driver
.note win95
32-bit x86 Windows 9x executable
.note win95 dll
32-bit x86 Windows 9x Dynamic Link Library
.note nt
32-bit x86 Windows NT character-mode executable
.note nt_win
32-bit x86 Windows NT windowed executable
.note win32
synonym for "nt_win"
.note nt_dll
32-bit x86 Windows NT Dynamic Link Library
.if '&alpha' eq 'AXP' .do begin
.note ntaxp
AXP Windows NT character-mode executable
.note ntaxp_win
AXP Windows NT windowed executable
.note ntaxp_dll
AXP Windows NT Dynamic Link Library
.do end
.note win386
32-bit x86 &company extended Windows 3.x executable or Dynamic Link Library
.endnote
.np
The various systems that we have listed above are defined in special
linker directive files which are plain ASCII text files that you can
edit.
These files are called :FNAME.wlink.lnk:eFNAME.
and :FNAME.wlsystem.lnk:eFNAME..
.*
.im wlinklnk
.*
.np
In the following sections, we show some of the typical directives that
you might use to create a particular executable file format.
The common directives are described in the chapter
entitled :HDREF refid='genchap'..
They are "common" in the sense that they may be used with any
executable format.
There are other, less general, directives that may be specified for a
particular executable format.
In each of the following sections, we refer you to chapters in which
you will find more information on the directives available with the
executable format used.
.np
At this point, it should be noted that various systems have adopted
particular executable file formats. For example, both the Tenberry
Software DOS/4G(W) and FlashTek DOS extenders support one of the OS/2
executable file
formats. It is for this reason that you may find that we direct you to
a chapter which would, at first glance, seem unrelated to the
executable file format in which you are interested.
.np
To summarize, the steps that you should follow to learn about creating
a particular executable are:
.autonote
.note
Look for a section in this chapter that describes the executable
format in which you are interested.
.note
See the chapter entitled :HDREF refid='genchap'. for a description of
the common directives.
.note
If you require additional information, see also the chapter to which
we have referred you.
.note
Also check the
.book &company C/C++ Programmer's Guide
or
.book &cmpfname Programmer's Guide
for more information on creating specific types of applications.
.endnote
.*
.section Linking 16-bit x86 Executable Files
.*
.np
.ix '16-bit executables'
The following sections describe how to link a variety of 16-bit
executable files.
.*
.beglevel
.*
.section Linking 16-bit x86 DOS Executable Files
.*
.np
.ix '16-bit DOS executables'
To create this type of file, use the following structure.
.millust begin
system dos
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='doschap'..
.*
.section Linking 16-bit x86 DOS .COM Executable Files
.*
.np
.ix '16-bit DOS .COM'
To create this type of file, use the following structure.
.millust begin
system com
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='doschap'..
.*
.section Linking 16-bit x86 OS/2 Executable Files
.*
.np
.ix '16-bit OS/2 executables'
To create this type of file, use the following structure.
.millust begin
system os2
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='os2chap'..
.*
.section Linking 16-bit x86 OS/2 Dynamic Link Libraries
.*
.np
.ix '16-bit OS/2 DLLs'
To create this type of file, use the following structure.
.millust begin
system os2 dll
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='os2chap'..
.*
.section Linking 16-bit x86 QNX Executable Files
.*
.np
.ix '16-bit QNX executables'
To create this type of file, use the following structure.
.millust begin
system qnx
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='qnxchap'..
.*
.section Linking 16-bit x86 Windows 3.x Executable Files
.*
.np
.ix '16-bit Windows 3.x executables'
To create this type of file, use the following structure.
.millust begin
system windows
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='winchap'..
.*
.section Linking 16-bit x86 Windows 3.x Dynamic Link Libraries
.*
.np
.ix '16-bit Windows 3.x DLLs'
To create this type of file, use the following structure.
.millust begin
system windows_dll
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='winchap'..
.*
.endlevel
.*
.section Linking 32-bit x86 Executable Files
.*
.np
.ix '32-bit executables'
The following sections describe how to create a variety of 32-bit
executable files.
.*
.beglevel
.*
.section Linking 32-bit x86 DOS/4GW Executable Files
.*
.np
.ix '32-bit DOS/4GW executables'
To create this type of file, use the following structure.
.millust begin
system dos4g
.im tutsteps
.millust end
.np
For more information,
see the chapter entitled :HDREF refid='os2chap'..
.*
.section Linking 32-bit x86 FlashTek Executable Files
.*
.np
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -