Sun Studio 12: Fortran Programming Guide

4.3.4.2 Specifying Dynamic Libraries at Runtime

At runtime, the linker determines where to find the dynamic libraries that an executable needs from:

As noted earlier, use of LD_LIBRARY_PATH can have unexpected side-effects and is not recommended.