gpt4 book ai didi

gcc - gcc 的 --sysroot 开关的替代品?

转载 作者:行者123 更新时间:2023-11-30 17:54:04 26 4
gpt4 key购买 nike

当您不希望标准路径中的 header /库影响您的构建时,--sysroot 开关非常有用。

--sysroot=dir: Use dir as the logical root directory for headers and libraries. For example, if the compiler would normally search for headers in /usr/include and libraries in /usr/lib, it will instead search dir/usr/include and dir/usr/lib. [ref]

可以通过使用环境变量、gcc specs 文件或任何其他不需要命令行开关的方法来完成同样的事情吗?

最佳答案

如果可以使用环境变量,则可以将 --sysroot 添加到 CFLAGS。

关于gcc - gcc 的 --sysroot 开关的替代品?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15209062/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com