-sysroot 的作用

如果在编译时指定了-sysroot就是为编译时指定了逻辑目录。编译过程中需要引用的库,头文件,如果要到/usr/include目录下去找的情况下,则会在前面加上逻辑目录。

如此处我们指定 -sysroot=/home/shell.albert/tools/toolschain_arm/4.4.3/arm-none-linux-gnueabi/sys-root

则如果在编译过程中需要找stdio.h,则会用/usr/include/目录下去找,因为我们指定了系统目录,则会到下面的路径去找。

相关文章:

  • 2021-05-25
  • 2022-12-23
  • 2021-09-30
猜你喜欢
  • 2021-06-06
  • 2022-02-13
  • 2022-01-04
相关资源
相似解决方案