Passing Linker Options with Multiple Arguments using -Xlinker,-Wl, or -Qoption,link

If you are using the compiler driver (icc/icpc/ifort) to link together object files, you may have a need to pass a linker option directly to ld that contains multiple parts, such as "-rpath <dir>".  There are several ways to do this.

-Xlinker -rpath -Xlinker <dir>


For more complete information about compiler optimizations, see our Optimization Notice.