ld: unknown flag: -shared
版主: ross_tt、bryanchang、digdog、chester
ld: unknown flag: -shared
奇怪, 系統十不是用 gcc 嗎? 我還看到這種error msg [img]images/smiles/icon_mad.gif[/img]
- bryanchang
- 討論區管理員
- 文章: 7057
- 註冊時間: 04/19/2001 1:01 am
- 來自: The '60s
- 聯繫:
ld: unknown flag: -shared
有種可能是因為你在 compile 的軟體以為系統用的是 cc...
ld: unknown flag: -shared
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 白萊恩:
<STRONG>有種可能是因為你在 compile 的軟體以為系統用的是 cc...</STRONG><HR></BLOCKQUOTE>
but,...
mjhsieh% cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-932.1, based on gcc version 2.95.2 19991024 (release) [img]images/smiles/icon_rolleyes.gif[/img]
<STRONG>有種可能是因為你在 compile 的軟體以為系統用的是 cc...</STRONG><HR></BLOCKQUOTE>
but,...
mjhsieh% cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-932.1, based on gcc version 2.95.2 19991024 (release) [img]images/smiles/icon_rolleyes.gif[/img]
- bryanchang
- 討論區管理員
- 文章: 7057
- 註冊時間: 04/19/2001 1:01 am
- 來自: The '60s
- 聯繫:
ld: unknown flag: -shared
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 謝孟叡:
<STRONG>but,...
mjhsieh% cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-932.1, based on gcc version 2.95.2 19991024 (release) [img]images/smiles/icon_rolleyes.gif[/img]</STRONG><HR></BLOCKQUOTE>
所以啦,你只要這樣:
ln -s /usr/bin/cc /usr/bin/gcc
應該就可以解決問題了。
[img]images/smiles/icon_wink.gif[/img]
<STRONG>but,...
mjhsieh% cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs Apple Computer, Inc. version gcc-932.1, based on gcc version 2.95.2 19991024 (release) [img]images/smiles/icon_rolleyes.gif[/img]</STRONG><HR></BLOCKQUOTE>
所以啦,你只要這樣:
ln -s /usr/bin/cc /usr/bin/gcc
應該就可以解決問題了。
[img]images/smiles/icon_wink.gif[/img]
- bryanchang
- 討論區管理員
- 文章: 7057
- 註冊時間: 04/19/2001 1:01 am
- 來自: The '60s
- 聯繫:
ld: unknown flag: -shared
你有沒有試過把 Makefile 改過,在 ld 的指令中加入 -flat_namespace ?
ld: unknown flag: -shared
嗯…
-shared
Create a shared library. This is currently only sup-
ported on ELF and SunOS platforms (on SunOS it is not
required, as the linker will automatically create a
shared library when there are undefined symbols and the
-e option is not used).
-shared
Create a shared library. This is currently only sup-
ported on ELF and SunOS platforms (on SunOS it is not
required, as the linker will automatically create a
shared library when there are undefined symbols and the
-e option is not used).
- bryanchang
- 討論區管理員
- 文章: 7057
- 註冊時間: 04/19/2001 1:01 am
- 來自: The '60s
- 聯繫:
ld: unknown flag: -shared
嗯,還是 digdog 厲害。昨天晚上我在 Darwin Dev List 上找了半天沒找到這纇的信件,結果就睡著了... [img]images/smiles/icon_razz.gif[/img]
ld: unknown flag: -shared
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 白萊恩:
<STRONG>昨天晚上我在 Darwin Dev List 上找了半天沒找到這纇的信件,結果就睡著了... [img]images/smiles/icon_razz.gif[/img]</STRONG><HR></BLOCKQUOTE>
說到找喔, 網站上那個 search mailman archives 的實在不怎麼好用(老實說, 感覺很 opensource [img]images/smiles/icon_razz.gif[/img]), 所以... 改用這個吧: [img]images/smiles/icon_cool.gif[/img]
Sherlock 2 plugin for searching the Darwin mailing lists
<STRONG>昨天晚上我在 Darwin Dev List 上找了半天沒找到這纇的信件,結果就睡著了... [img]images/smiles/icon_razz.gif[/img]</STRONG><HR></BLOCKQUOTE>
說到找喔, 網站上那個 search mailman archives 的實在不怎麼好用(老實說, 感覺很 opensource [img]images/smiles/icon_razz.gif[/img]), 所以... 改用這個吧: [img]images/smiles/icon_cool.gif[/img]
Sherlock 2 plugin for searching the Darwin mailing lists
ld: unknown flag: -shared
<BLOCKQUOTE><font size="1" face="XYZ">quote:</font><HR>原始發信人 白萊恩:
<STRONG>所以啦,你只要這樣:
ln -s /usr/bin/cc /usr/bin/gcc
應該就可以解決問題了。
[img]images/smiles/icon_wink.gif[/img]</STRONG><HR></BLOCKQUOTE>
I think it was not the case.because we got the same error message.... 也許該裝 gnudarwin 的 ld ....
<STRONG>所以啦,你只要這樣:
ln -s /usr/bin/cc /usr/bin/gcc
應該就可以解決問題了。
[img]images/smiles/icon_wink.gif[/img]</STRONG><HR></BLOCKQUOTE>
I think it was not the case.because we got the same error message.... 也許該裝 gnudarwin 的 ld ....
- bryanchang
- 討論區管理員
- 文章: 7057
- 註冊時間: 04/19/2001 1:01 am
- 來自: The '60s
- 聯繫:
ld: unknown flag: -shared
另外還有 Rob Braun 的 Darwinfo.org 也提供了 search 的功能,本來是要去的,可惜睡魔造訪... [img]images/smiles/icon_biggrin.gif[/img]