◦
◦
◦
◦
◦
◦
◦
◦
◦
◦
◦
◦
◦
◦
◦
“Specifying Libraries with
“Flagging Unsatisfied Symbols with +[no]allowunsats” (page 45)
“Stripping Symbol Table Information from the Output File with
“Controlling Output from the Unwind Table with +strip unwind” (page 46)
“Using the IPF Linker with +compat or +std” (page 46)
“Linking in
“Linking in
“Changing Mapfiles with
“Selecting Verbose Output with +vtype” (page 48)
“Turning on the linkage table protection with +protect” (page 50)
“Allocating Storage for Uninitialized Data with +nobss” (page 50)
“Initializing Floating Point Environment with +FP ” (page 50)
“Allocating Storage for Hidden Common Symbols with +alloc_hidden_commons” (page 51)
“Turn Off Linker Warnings with
“Preserving Compiler Generated Relocation Sections with
Using the Compiler to Link
In many cases, you use your compiler command to compile and link programs. Your compiler uses options that directly affect the linker.
Changing the Default Library Search Path with
The
Example Using
For example, to make the f77 compiler search /usr/local/lib to find a locally developed library named liblocal, use this command line:
$ f77 prog.f
(The f77 compiler searches /opt/fortran/lib and /usr/lib as default directories.)
To make the f90 compiler search /usr/local/lib to find a locally developed library named liblocal, use this command line:
$ f90 prog.f90
(The f90 compiler searches /opt/fortran90/lib and /usr/lib as default directories.) For the C compiler, use this command line:
$ cc
The LPATH environment variable provides another way to override the default search path. For details, see “Changing the Default Library Search Path with
28 Determining How to Link Programs or Libraries (Linker Tasks)