Previous Topic Next topic Print topic


cbllink Examples

Use the cbllink command to link .obj files, or to compile and link source code files in one step.

To Produce a System Executable File

To compile and link the file myprog.cbl to produce an .exe file, myprog.exe, use the command:

cbllink myprog.cbl
To Produce a Dynamic Link Library File

To compile and link the file mydll.cbl to produce a .dll file, mydll.dll, use the command:

cbllink -d mydll.cbl
To Create a Dynamically Linked Application

To create an application in which the files main.cbl and fast1.cbl are compiled and linked to create the root module of the graphical application myapp.exe, use the command:

cbllink -g -s -omyapp.exe main.cbl fast1.cbl

To create an application in which the files subprog1.cbl and subprog2.cbl are compiled and linked to create a dynamic link library, subprogs.dll, use the command:

cbllink -d -s -osubprogs.dll subprog2.cbl subprog3.cbl
To Create a Dynamically Bound Application

To create a .dll file that can bind to the run-time system, and any version later than or including that supplied with this COBOL development system, use the command:

cbllink -d -r mydll.obj

To create a .dll file that must bind to the version of the run-time system supplied with this COBOL development system, use the command:

cbllink -d -rv mydll.obj
Previous Topic Next topic Print topic