5

私のコンパイラ:xlcバージョン10.1環境:AIX5.3リンカー:ld

Linuxで作業する場合、gcc(4.4.1)で次のオプションを使用します

-Wl,-rpath

(リンカオプションの場合は-Wl)ランタイムライブラリの検索パスにディレクトリを追加します。

xlcコンパイラに相当するものは何ですか?

または、リンカの-rpathに相当するものは何ですか。

ありがとうございました。

4

1 に答える 1

5

私の最初の答えは次のとおりです。その 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.
于 2009-10-08T18:07:12.477 に答える