什么是海湾合作委员会的默认包含目录? [英] What are the GCC default include directories?

查看:88
本文介绍了什么是海湾合作委员会的默认包含目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我编译一个非常简单的源文件用gcc我没有标准的包含文件,如标准输入输出或STDLIB到指定路径。

When i compile a very simple source file with gcc I don't have to specify the path to standard include files such as stdio or stdlib.

如何GCC知道如何找到这些文件?

How GCC knows how to find these files?

是否有 / usr / include目录路径内硬,否则它会从其他OS组件的路径?

Does it have the /usr/include path hardwired inside, or it will get the paths from other OS components?

推荐答案

为了找出所使用的默认路径的gcc / g ++的,以及它们的优先级可以检查以下命令的输出:

In order to figure out the default paths used by gcc/g++ as well as their priorities you examine the output of the following commands:


  1. 有关C:

  1. For C:

gcc -xc -E -v -


  • 有关C ++:

  • For C++:

    gcc -xc++ -E -v -
    


  • 要归功于Qt Creator的团队。

    The credit goes to Qt Creator team.

    这篇关于什么是海湾合作委员会的默认包含目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆