5

如何将选项--enable-auto-import从 gcc 传递给 ld?

4

4 回答 4

10
gcc ... -Wl,--enable-auto-import ...
于 2010-05-28T09:26:26.323 回答
3
  -Xlinker option
       Pass option as an option to the linker.  You can use this to supply system-specific
       linker options which GCC does not know how to recognize.
于 2010-05-28T09:27:22.767 回答
2

您使用 -Xlinker 选项将选项传递给链接器

$ gcc -Xlinker--enable-auto-import blah...

应该管用。

于 2010-05-28T09:26:52.193 回答
1

警告:很少提及,但如果您有一个需要值的链接器选项,请说...

-current_version 1

...您需要执行以下操作:

-Wl,-current_version,1

... 或者 ...

-Xlinker -current_version -Xlinker 1
于 2018-04-23T21:41:49.003 回答