Use the cbllink command to link .obj files, or to compile and link source code files in one step.
To compile and link the file myprog.cbl to produce an .exe file, myprog.exe, use the command:
cbllink myprog.cbl
To compile and link the file mydll.cbl to produce a .dll file, mydll.dll, use the command:
cbllink -d mydll.cbl
The following command compiles and the files main.cbl, module1.cbl, module2.cbl and any run-time support modules that are needed to create the graphical main.exe:
cbllink -g -b main.cbl module1.cbl module2.cbl
The following command compiles and statically links the files main.cbl, module1.cbl, and any run-time support modules that are needed to create the character-based standalone executable myapp.exe:
cbllink -b -omyapp.exe main.cbl module1.cbl
The following commands:
cbllink -g -s main.cbl unique1.cbl cbllink -d mffh
The following commands:
cbllink -s -omyapp.exe main.cbl unique1.cbl cbllink -d adis adisinit adiskey
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 .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