Link a COBOL application.
Attribute | Description | Required |
---|---|---|
additionaloptions | Specify additional platform-specific options that are to be included on the linker command line. Defaults to "". | No |
apptype | Specify whether the application is to be linked as a console or graphical application. The value of this attribute must be
one of "console" or "gui". Defaults to "console".
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
bindrts | Specify whether the application is to be bound to the current run-time system when the application is linked to the dynamic
COBOL run-time system using the dynamicrts attribute. Defaults to
false.
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
debug | If true, links the application for debugging. Defaults to false. | No |
destdir | The name of the directory where the linked application is to be written. Defaults to the current directory. | No |
destext | Specify the extension of the executable that the linker is to produce. If not specified, ".exe" or ".dll" will be used on Windows and "" or ".so" will be used on UNIX for executables and shared objects respectively. | No |
destfile | The name of the linked application. The extension specified by the destext attribute will be appended to this name. | No |
desttype | The type of application the linker is to generate. The value of this attribute must be one of "exe", "dll/cso", "dll", "so", "cso", "shlib" or "sccso" Note that on Windows, any of these values other than exe will generate a dynamic link library. On UNIX, "dll/cso", "dll", "so" or "cso" will generate a shared object, "shlib" will generate a shared library and "sccso" will generate a self-contained callable shared object. Defaults to "exe". | No |
dynamicrts | Specify whether the application is linked with the dynamic COBOL run-time system. This attribute is mutually exclusive with
the sharedrts and staticrts attributes. Defaults to
false.
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
entrypoint | The name of the main entry-point for an applications being linked as desttype="exe". Defaults to "". | No |
errorundefinedsyms | Specify whether undefined symbols will cause an error to be generated. Defaults to false.
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
entrypointruntime | Specify whether the entry point address will be read from the command line at run-time. Defaults to false.
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
failonerror | If true, stops the build process if the task exits with a return-code other than 0. Defaults to false. | No |
includeCPP | Specify whether C++ support will be included in the executable. Defaults to false.
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
is64bit | If true, links a 64-bit application. Defaults to false (i.e. 32-bit target). | No |
linkcommand | Specify a custom link command to be used to link the target executable. If specified, all other attributes are ignored and the cobollink task uses the given command to link the application. Defaults to "". | No |
objectdir | Specify the directory where the object files specified using the objectfile attribute are to be picked up from. | No |
objectfile | Specify the name of the object file to link the application. Must not be used if nested mffilelist elements have been specified. Defaults to "". | No |
options | Specify additional options to be passed to the COBOL linker. Defaults to "". | No |
resfile | Specify a Windows resource file name to be used in linker command line. The following are valid definitions for a resource
file with name "MyResFile.res": resfile="MyResFile.res" resfile="MyResFile" resfile="Absolute path\MyResFile" resfile="Relative
path\MyResFile"
Important:
|
No |
sharedrts | Specify whether the application is linked with the shared COBOL run-time system. This attribute is mutually exclusive with
the dynamicrts and staticrts attributes. Defaults to true.
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
staticrts | Specify whether the application is linked with the static COBOL run-time system. This attribute is mutually exclusive with
the dynamicrts and sharedrts attributes. Defaults to false.
Important: This attribute is applicable only on UNIX and is ignored on Windows.
|
No |
mf.buildThreadCount | The maximum number of parallel compilations to be used. Defaults to 1. | No |
threadedrts | Specify whether the application is linked with the threaded COBOL run-time system. Defaults to false.
Important: This attribute is applicable only on UNIX and is ignored on Windows (the threaded COBOL run-time system is always used on
Windows).
|
No |
userEnv | The name of the properties file that contains the user specified environment variables. | No |
verbose | If true, causes additional informational messages to be displayed by the task. Defaults to false. | No |
Link a COBOL application named Program1.exe from the three object files: Program1.obj, Program2.obj and Program3.obj with the shared multi-threaded COBOL run-time system:
<cobollink destdir="${basedir}/bin" destfile="LinkedProgram" desttype="exe" entrypoint="Program1" threadedrts="true" sharedrts="true"> <mffilelist srcdir="${basedir}/bin" type="objfile"> <file name="Program1.obj"/> <file name="Program2.obj"/> <file name="Program3.obj"/> </mffilelist> </cobollink>