代码 a.c
#include <stdio.h> int main(void) { printf("hello \n"); return 0; }
Windows下
解压mingw-w64-bin-x86_64
为了方便CMD添加path C:\Users\YT>path E:\mingw64\bin
e:\c>gcc e:\c\a.c -o e:\c\a.exe
-o out路径
Linux下
注意运行时,即使a1.out在当前目录,也要加上 ./a1.out
#include <stdio.h> int main(void) { printf("hello \n"); return 0; }
解压mingw-w64-bin-x86_64
为了方便CMD添加path C:\Users\YT>path E:\mingw64\bin
e:\c>gcc e:\c\a.c -o e:\c\a.exe
-o out路径
注意运行时,即使a1.out在当前目录,也要加上 ./a1.out