MinGW gcc无法解析系统头文件

MinGW gcc无法解析系统头文件

问题描述:

我正在尝试使用MinGW64 + msys为64位Windows编译我的C应用程序.

I’m trying to compile My C apps for windows 64bit with MinGW64+msys.

安装它们后,我启动了gcc的示例程序,并出现以下错误.

After installing them I started gcc for sample program and got following error.

C:\MinGW\bin>gcc a.c

a.c:1:19: fatal error: stdio.h: No such file or directory

compilation terminated.

C:\MinGW\bin>

但是stdio.h文件位于C:\MinGW\include中.

我应该怎么解决stdio.h?

What should I do for resolving stdio.h?

您可以尝试:gcc a.c -IC:\MinGW\include看看它是否可以编译.

You can try: gcc a.c -IC:\MinGW\include and see if it compiles.