aix5.3(ld-xlc)等效选项Linux(ld-gcc)-rpath

aix5.3(ld-xlc)等效选项Linux(ld-gcc)-rpath,gcc,linker,aix,xlc,rpath,Gcc,Linker,Aix,Xlc,Rpath,我的编译器:xlc版本10.1 环境:AIX5.3 链接器:ld 当我在Linux上工作时,使用gcc(4.4.1)我使用以下选项 -Wl,-rpath (-Wl表示链接器选项)它向运行库搜索路径添加一个目录 xlc编译器的等价物是什么 或者链接器的-rpath等效于什么 谢谢。我的第一个答案是:该链接器的AIX链接器选项是-blibpath。 (如果有任何帮助,对于Sun编译器,它是-R。以防万一!) 我现在编辑它以回应OP的评论:没错。实际上,阅读AIX链接器手册(manld)看起来-L已

我的编译器:xlc版本10.1 环境:AIX5.3 链接器:ld

当我在Linux上工作时,使用gcc(4.4.1)我使用以下选项

-Wl,-rpath
(-Wl表示链接器选项)它向运行库搜索路径添加一个目录

xlc编译器的等价物是什么

或者链接器的-rpath等效于什么


谢谢。

我的第一个答案是:该链接器的AIX链接器选项是
-blibpath
。 (如果有任何帮助,对于Sun编译器,它是
-R
。以防万一!)

我现在编辑它以回应OP的评论:没错。实际上,阅读AIX链接器手册(
manld
)看起来
-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.

它实际上并不相同,因为您必须指定如下内容:-blibpath:/usr/lib:/lib/:my_lib等。。。。我不想破坏现有的库路径,你去做吧-L似乎足够了,-blibpath,-bnolibpath或-bsvr4选项禁止此选项。