MinGW编译显示缺少头文件,可能缺少哪个软件包?

时间:2019-03-17 14:04:09

标签: c gcc compiler-errors mingw gcc-warning

这是编译时出现的第一个gcc错误,它是从网上将features.h复制到MinGW帮助的include文件夹中的:

$ gcc -g hello_world.c
In file included from c:\mingw\include\stdio.h:55,
                 from hello_world.c:1:
c:\mingw\include\_mingw.h:174:10: fatal error: features.h: No such file or directory
 #include <features.h>
          ^~~~~~~~~~~~
compilation terminated.

这是新错误:

$ gcc -g hello_world.c
In file included from c:\mingw\include\_mingw.h:174,
                 from c:\mingw\include\stdio.h:55,
                 from hello_world.c:1:
c:\mingw\include\features.h:406:10: fatal error: stdc-predef.h: No such file or directory
 #include <stdc-predef.h>
      ^~~~~~~~~~~~~~~
compilation terminated.

hello-world文件:

#include <stdio.h>   int main(int argc, const char *argv[]) { 

           /* I am C developer */ 

           printf("Hello, Poftut! \n"); 

           return ;  }

C:\ MinGW \ bin \在PATH中。确定我错过了某些软件包安装。

0 个答案:

没有答案