Inhibit default library paths with gcc

前端 未结 4 928
太阳男子
太阳男子 2020-12-30 02:03

Is there a way to inhibit the default library path search with gcc? -nostdinc does this for the include path search, but -nostdlib, either by omiss

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-30 02:19

    You can try -nodefaultlibs to avoid all the default libraries, then use -L and -l to add-back the libraries you want in the directories you want. Directories specified on the command-line with the -L option should have priority over the default directories.

提交回复
热议问题