HP Fortran Programmer Guide HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 (B3908-90032,December 2012)

Table 6 Options for controlling the Linker (continued)
FunctionOption
Add directory to the front of the library search path.
This option applies only to libraries specified by the -l
-Ldirectory
option (see below). If you compile and link separately and
specify -L on the command line, you must also specify it
on the link line.
nl
For information about using this option, see “Library search
rules” on page 82.
Link the library libx.a or libx.sl to the executable
program. If you compile and link separately and specify
-lx
-l on the command line, you must also specify it on the
link line.
nl
For information about using this option, see “Linking to
nondefault libraries” on page 79 and the ld(1) manpage.
Name the output file outfile instead of the default
a.out. If linking is suppressed (-c), this option is used
instead to name the object files.
-ooutfile
Cause the output file from the linker to be marked shared
[unshared]. If you compile and link separately and specify
+[no]shared
+shared on the command line, you must also specify it
on the link line. The default is +shared. For information
about using this option, see “Creating shared executables
on page 93.
Strip [do not strip] symbol table information from the linker
output. For more information, see the ld(1)) and strip(1)
+[no]strip
manpages. This option is not compatible with -g. If you
compile and link separately and specify +strip on the
command line, you must also specify it on the link line. The
default is +nostrip.
nl
For information about using this option, see “Stripping
debugging information” on page 119.
Use buffered [unbuffered] output to the terminal. The default
is +ttybuf.
+[no]ttybuf
Invoke [do not invoke] support for the libU77 library (BSD
3f). If you compile and link separately and specify +U77
+[no]U77
on the compile line, you must also specify it on the link
line. The default is +noU77.
nl
For information about the libU77 library, see “Additional
HP Fortran libraries” on page 80 and the HP Fortran
Programmer’s Reference.
Pass a comma-separated list of options to the linker.
nl
-Wl,options
For information about options supported by the linker, see
the ld(1) manpage.
Tools
The HP Fortran compiler environment includes a high-level language debugger and performance
analysis tools. The debugger is HP WDB, which includes a graphical user interface. To prepare
a program for debugging, you must compile it with the -g option. For information about this
option, see “Using the HP WDB debugger” on page 118.
The performance analysis tools include the standard UNIX utilities, prof and gprof. To use prof
and gprof, you must compile with the +prof and +gprof options, respectively. For more
information about all of the performance analysis tools, see “Using profilers” on page 140 and
the CXperf(1), prof(1), gprof(1), and ttv(1) manpages.
Tools 15