zoukankan      html  css  js  c++  java
  • 使用gcc找出头文件的路径

    参考 http://stackoverflow.com/questions/13079650/how-can-i-find-the-header-files-of-the-c-programming-language-in-linux

    gcc -H -fsyntax-only test.c 

    例如:
    $ cat > test.c
    #include <stdbool.h>
    #include <stdio.h>
    ^D
    $ gcc -H -fsyntax-only test.c
    . /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdbool.h
    . /usr/include/stdio.h
    .. /usr/include/features.h
    ... /usr/include/x86_64-linux-gnu/bits/predefs.h
    ... /usr/include/x86_64-linux-gnu/sys/cdefs.h
    .... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    ... /usr/include/x86_64-linux-gnu/gnu/stubs.h
    .... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    .... /usr/include/x86_64-linux-gnu/gnu/stubs-64.h
    .. /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h
    .. /usr/include/x86_64-linux-gnu/bits/types.h
    ... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    ... /usr/include/x86_64-linux-gnu/bits/typesizes.h
    .. /usr/include/libio.h
    ... /usr/include/_G_config.h
    .... /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h
    .... /usr/include/wchar.h
    ... /usr/lib/gcc/x86_64-linux-gnu/4.7/include/stdarg.h
    .. /usr/include/x86_64-linux-gnu/bits/stdio_lim.h
    .. /usr/include/x86_64-linux-gnu/bits/sys_errlist.h
     
  • 相关阅读:
    接口
    java基础
    java的反射
    按照字典序打印所有的字符串
    求幂的问题
    时间复杂度与空间复杂度
    孩子们的游戏(圆圈中最后剩下的数)
    约瑟夫环问题
    翻转单词顺序列
    复杂链表的复制
  • 原文地址:https://www.cnblogs.com/bettersky/p/6714361.html
Copyright © 2011-2022 走看看