AIX 5.3 (ld-xlc) equivalent Linux option (ld-gcc) -rpath

My compiler: xlc version 10.1 Environment: AIX5.3 Linker: ld

When I work on Linux, gcc (4.4.1), I use the following parameter

-Wl,-rpath

(- Wl for linker options) adds the directory to the search path of the runtime library.

What is the equivalent for xlc compiler?

or the -rpath equivalent for the linker.

Thanks.

+5
source share
1 answer

My first response was: . For this linker, AIX is -blibpath. (If that helps, for the Sun compiler this -R. Just in case!)

, OP: . , AIX (man ld), , -L !

   -LDirectory
        Adds Directory to the list of search directories used for finding
        libraries designated by the -l (lowercase letter L) flag. The list
        of directories, including the standard library directories, is
        also recorded in the output object file loader section for use by
        the system loader unless you use the -blibpath, -bnolibpath, or
        -bsvr4 option. You can repeat this flag.
+4

All Articles