C++ User's Guide

-norunpath

Does not build a runtime search path for shared libraries into the executable.

If an executable file uses shared libraries, then the compiler normally builds in a path that points the runtime linker to those shared libraries. To do so, the compiler passes the -R option to ld. The path depends on the directory where you have installed the compiler.

This option is helpful if you have installed the compiler in some nonstandard location, and you ship an executable file to your customers. Your customers don't have to work with that nonstandard location.

Interactions

If you use any shared libraries under the compiler installed area (default location /opt/SUNWspro/lib) and you also use -norunpath, then you should either use the -R option at link time or set the environment variable LD_LIBRARY_PATH at runtime to specify the location of the shared libraries. Doing so allows the runtime linker to find the shared libraries.