Pass -lx to the linker to specify additional libraries for ld to search for unresolved references. ld links with object library libx. If shared library libx.so is available (and -Bstatic or -dn are not specified), ld uses it, otherwise, ld uses static library libx.a. If it uses a shared library, the name is built in to a.out. No space is allowed between -l and x character strings.
Example: Link with the library libVZY:
demo% f95 any.f -lVZY
Use -lx again to link with more libraries.
Example: Link with the libraries liby and libz:
demo% f95 any.f -ly -lz
See also the “Libraries” chapter in the Fortran Programming Guide for information on library search paths and search order.