Question

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

When i work on Linux , with gcc (4.4.1) i use the following option

-Wl,-rpath

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

What's the equivalent for xlc compiler ?

or what's the equivalent to -rpath for the linker.

Thank you.

Was it helpful?

Solution

My first answer was: The AIX linker option for that one is -blibpath. (If it's any help, for the Sun compiler, it's -R. Just in case!)

I now have edited it to respond to the OP's comment: Right you are. Actually, reading the AIX linker manual (man ld) it looks like -L is the right option already!

   -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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top