我尝试使用-whole-archive
/-no-whole-archive
选项进行链接。gcc 是 4.1.2。当我尝试时:
g++ ...... -Wl, -whole-archive libA.a -Wl, -no-whole-archive libB.a ...
它说-whole-archive
并且-no-whole-archive
无法识别。当我替换-whole-archive
为--whole-archive
, 和相同时no-whole-archive
,它说
error: unrecognized command line option "-fwhole-archive"
error: unrecognized command line option "-fno-whole-archive"
有谁知道问题出在哪里?