我正在尝试从 vim 和 vi 编译和运行 ac 项目
#include<stdio.h>
int main(void)
{
printf("Hello! This is a test prgoram.\n");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我得到这个输出
madona@madona-Java ~ $ vi demo.c
[No write since last change]
make: *** No targets specified and no makefile found. Stop.
Press ENTER or type command to continue
[No write since last change]
gcc: error: demo.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
shell returned 4
Run Code Online (Sandbox Code Playgroud)
使用这个之后:!gcc demo.c。我究竟做错了什么?
当我尝试运行时,我也遇到了这个问题:
gcc -o demo …Run Code Online (Sandbox Code Playgroud) vim ×1