Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Linking from the command line

Use the IBM Library Manager (ILIB) to create and maintain libraries of object code, create import libraries and export object pairs, and generate module definition (.def) files. You can then invoke the linker either directly by issuing the ILINK command, or indirectly by using the cob2 command.

When you start the linker from the command line, the linker assumes that any inputs that it cannot recognize as other files, options, or directories must be object files. Use a space or tab character to separate files. You must enter at least one object file.

To have the linker search additional directories for input files, specify a drive or directory by itself on the command line. Specify the drive or directory with a slash (/) or backslash (\) character at the end. The paths you specify are searched before the paths in the LIB environment variable.

You can write a makefile to organize the sequence of actions (such as compiling and linking) that are required to build your project. You can use the makefile to invoke all those actions in one step.

Examples: using cob2 for linking
Example: overriding linker options

related tasks
Using NMAKE to update projects
Creating module definition files

related references
Linker search rules


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)