use*_*104 2 c++ gcc g++ static-libraries
我尝试使用-whole-archive/-no-whole-archive选项进行链接。gcc 是 4.1.2。当我尝试:
g++ ...... -Wl, -whole-archive libA.a -Wl, -no-whole-archive libB.a ...
Run Code Online (Sandbox Code Playgroud)
它说-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"
Run Code Online (Sandbox Code Playgroud)
有谁知道问题出在哪里?
Ata*_*far 10
您是否尝试过使用以下语法?
-Wl,--whole-archive
Run Code Online (Sandbox Code Playgroud)
即,逗号和两个破折号后没有空格。
| 归档时间: |
|
| 查看次数: |
5568 次 |
| 最近记录: |