问题
今天建立了个个helloworld.c 以及Makefile文件.
hellworld.c 中内容如下:
#include<stdio.h>
int main()
{
printf("hello world\n");
return 0;
}Makefile中的内容如下:
hello:helloword.c
gcc -o hello helloword.c然后 make 出现如下错误:
makefile:2: *** missing separator. Stop.整体效果如图下代码所示:
root@ubuntu:~/lesson/chap1/1-1# ls
helloword.c makefile
root@ubuntu:~/lesson/chap1/1-1# make
makefile:2: *** missing separator. Stop.解决方法
在gcc -o hello helloword.c前面用TAB键,而不是空格空格空格
版权声明:本文为u010608296原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。