Why is stddef.h not in /usr/include?

前端 未结 3 1289
难免孤独
难免孤独 2021-01-18 02:48

I have compiled the gnu standard library and installed it in $GLIBC_INST.

Now, I try to compile a very simple programm (using only one #include

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-18 03:35

    Why is that file not under /usr/include?

    Because there's absolutely no requirement for standard headers to be located at /usr/include/.

    The implementation could place them anywhere. The only guarantee is that when you do #include , the compiler/preprocessor correctly locates and includes it. Since you disable that with -nostdinc option of gcc, you are on your own (to correctly give the location of that header).

提交回复
热议问题