cmd 上的 gcc-Mingw 编译错误
gcc-Mingw compilation error on cmd
我在 windows 32 位的 c 编程语言上安装了 gcc-mingw .. 我第一次在我的笔记本电脑上安装,所以当我打开记事本文件并将这个文件保存在桌面上时,名称为 hello.c
#include <stdio.h>
int main()
{
/* my first program in C */
printf("Hello, World! \n");
return 0;
}
然后当我打开命令提示符并输入
gcc hello.c -o hello
然后显示错误
gcc:error:hello.c:no such file or directory
gcc:fatal error:no input files
compialtion terminated
如何解决这个错误?
我怀疑你是 运行 来自与你的 hello.c 文件所在文件夹不同的文件夹的命令
我在 windows 32 位的 c 编程语言上安装了 gcc-mingw .. 我第一次在我的笔记本电脑上安装,所以当我打开记事本文件并将这个文件保存在桌面上时,名称为 hello.c
#include <stdio.h>
int main()
{
/* my first program in C */
printf("Hello, World! \n");
return 0;
}
然后当我打开命令提示符并输入
gcc hello.c -o hello
然后显示错误
gcc:error:hello.c:no such file or directory
gcc:fatal error:no input files
compialtion terminated
如何解决这个错误?
我怀疑你是 运行 来自与你的 hello.c 文件所在文件夹不同的文件夹的命令