AIX 5.3 (ld-xlc) 等效选项 Linux (ld-gcc) -rpath

发布于 2024-08-06 15:08:28 字数 261 浏览 9 评论 0原文

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

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

-Wl,-rpath

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

xlc 编译器的等效项是什么?

或者相当于链接器的 -rpath

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萝莉病 2024-08-13 15:08:28

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

我现在已经对其进行了编辑以回应 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.

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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文