Code Profiling Utilities Manual

Building the Application
HP Code Profiling Utilities Manual542684-003
3-6
Linking the Object Files
Linking the Object Files
To link instrumented object files, you must specify the option -l pgo if invoking the
linker directly. If the linker is invoked through the C/C++ or COBOL compiler and you
have specified one of the options to create an instrumented object file, the compiler
automatically inserts the -l pgo option. EpTAL supports invoking the linker through
the compiler only on the workstation (via ETK), and not on the NonStop server;
however EpTAL on the workstation does
not
automatically insert the -l pgo option.
HP Enterprise Toolkit (ETK) Considerations
For each source file that is to generate instrumented object code at compile time, you
must add the appropriate compiler driver flags to the Additional box on the compiler's
General page. You can add the information at the project level, in which case it applies
to all source files in the project, or at the file level to select a subset of files to be
instrumented. Enter the flags exactly as you would enter them on the command line
invoking a compiler driver.
In addition, you must specify the dynamic-link library zpgodll as input at link time. Enter
pgo in the Dynamic and Static Libraries text box on the Linker Input property page. If
the box already specifies other libraries, append pgo to the list, using a semicolon (;)
as the separator.
Example
See Build the Application on page 9-8.