![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Compile > LinkThe Compile > Link command links the current selection, producing executables based on main entry points in the designated program units. If linking is successful, the units advance to the linked compilation state.
If you select the command from a viewer window, it brings up the Link dialog box. If you select the command from an editor window, it analyzes the current unit using the Link dialog-box defaults. To force the dialog box to appear from an editor window, press Control —— Compile > Link.
A list of the switches (including the linker switches) can be displayed using the Control > Show > Switches (Apex/Summit) or Compile > Architectural Control > Switches (Apex/ClearCase) command. For a listing of just the linker switches, use the following command in an Apex shell:
%show_switches -context | grep -i link
Link Dialog Box Fields:
Units to Link
Use the Units to link list field to specify which unit or units to link. Use the Add, Remove and Clear buttons to add or remove entries from this field. If you name a view or directory, the command attempts to link all contained library subprogram bodies having pragma Main. If you specify a configuration, the command attempts to link all library subprogram bodies having pragma Main in each view listed in the configuration.
Check Boxes
- Stop Check Box
The Stop when the first error is found check box stops the unit analysis at the first unit containing an error. If this check box is not selected (the default), the command analyzes all units in the specified closure and returns any errors.
- Build derived objects
Performs the link as a ClearCase audited link. This option invokes the do_clearcase_audit command to do the audited link operation on the object to be coded and its import closure.
If a source unit filename is given in Units to link, then a ClearCase configuration record (CR) is generated which is suitable for producing a "bill of materials" listing all source files and other filesystem objects that contributed to the link of the executable.
If library contexts are given in Units to link, then the resulting CR will enable other views to "wink in" the compilation artifacts being generated in the current view, but it will not be suitable for producing a bill of materials. Winkin is typically used in newly-created ClearCase views to eliminate the need for an initial build. This form of the command is identical to invoking the Compile > Code command with Build derived objects selected, except that in addition it promotes subsystems to the "linked" compilation state (that is, linking all program units to which pragma Main is applied).
When build derived objects is selected, another radio button, Do not clean closure is displayed. This option is deselected by default, thus the closure will be cleaned.
Analysis Options
A number of analysis tools have been integrated with this product and can be invoked during the link cycle for some variants of this product. The default is that no additional analysis tools are invoked. If the tool name is greyed out, it is not available with your variant of Apex.
- Testmate Coverage
TestMate is a layered product that provides a tightly integrated software test management system.
Link with Configuration Field
Enter a configuration name in the Link with configuration field to specify a configuration to use during the link. If you do not specify a configuration, the command makes a link closure from the associated imports of the main program. See More on Configurations (Apex/Summit)
If the program unit links successfully, Compile > Link creates an executable in the unit's enclosing directory. The executable is the name of the program without a .2.ada (Ada) or .c (C/C++) extension. For example, the executable for a unit called convert.2.ada (Ada) or convert.c (C/C++) is convert.
Options Field
Use the Options field to specify any command-line compiler switches. Command Options describes these options.
Command Line Interface: link (ada)
Command Line Interface: link (c++)
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2001, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |