Line 8 is the command line thatf90 passes to the linker (ld). If you use the ld command to link hello.f90, the command line should be similar to the one shown here.

As noted in the comments on lines 7 and 8, compiling and linking hello.f90successfully using both the f90and ldcommands requires three command lines:

$ f90 -c hello.f90 # compile

$ export LPATH=/opt/fortran90/lib/pa1.1:/usr/lib/pa1.1:\ /opt/fortran90/lib:/usr/lib:/opt/langtools/lib# set LPATH

$ ld -x /opt/langtools/lib/crt0.o hello.o \ /opt/fortran90/lib/libF90.a -lcl -lc -lisamstub # link

The command line to setLPATH in the csh is:

$ setenv LPATH /opt/fortran90/lib/pa1.1:/usr/lib/pa1.1:\ /opt/fortran90/lib:/usr/lib:/opt/langtools/lib# set LPATH

For more information about the linker, see the ld(1) man page. For a list of f90 options that you can use to control the linker, see Table on page 14. To pass linker options from the f90 command line to the linker, use the-Wloption (for an example, see “Linking to shared libraries” (page 53)). The HP Fortran Programmer’s Reference, fully describes the -Wloption.

Linking to libraries

When you use the f90 command to create an executable program, the linker looks in the libraries listed in Table 2-14 to resolve references. By default, the linker uses the shared libraries, if available. For information about shared libraries, see “Linking to shared libraries” (page 53).

The libisamstublibrary is provided as a tool for migrating HP FORTRAN77™ programs that call ISAM routines. The ISAM library is not available with HP Fortran, but the stub library allows the linker to resolve references to ISAM routines in HP FORTRAN 77 programs.

Table 22 Libraries linked by default on PA-RISC

Library

Contents

/usr/lib/libcl.a

Archive version of HP Fortran runtime library

 

 

/usr/lib/libcl.sl

Shared version of HP Fortran runtime library

 

 

/opt/fortran90/lib/libF90.a

Archive library of array intrinsic procedures

 

 

/usr/lib/libc.sl

Shared library of intrinsic procedures and system routines,

 

 

/opt/fortran90/lib/libisamstub.a

Archive libraries of stubs to satisfy ISAM references

/opt/fortran90/lib/libisamstubs.a

 

 

 

/usr/lib/libisamstub.sl

Shared library of stubs to satisfy ISAM references

 

 

Table 23 Libraries linked by default on Itanium

Library

Contents

 

 

/usr/lib/hpux[3264]/libIO77.a

Archive version of HP Fortran runtime library

 

 

/usr/lib/hpux[3264]/libIO77.so

Shared version of HP Fortran runtime library

 

 

/usr/lib/hpux[3264]/libF90.a

Archive library of array intrinsic procedures

 

 

/usr/lib/hpux[3264]/libF90.so

Shared library for Fortran intrinsic procedures

 

 

/usr/lib/hpux[3264]/libF90_paral lel.a

Archive library for Fortran intrinsic procedures on parallel

 

mode

 

 

/usr/lib/hpux[3264]/libF90_paral lel.so

Shared library for Fortran intrinsic procedures on parallel

 

mode

 

 

Linking HP Fortran programs 51