makefile:2: *** missing separator. Stop. make 之后出现的错误,解决方法

来源:互联网 发布:linux硬盘分区命令 编辑:程序博客网 时间:2024/06/17 20:32

问题
今天建立了个个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# lshelloword.c  makefileroot@ubuntu:~/lesson/chap1/1-1# makemakefile:2: *** missing separator.  Stop.

解决方法
gcc -o hello helloword.c前面用TAB键,而不是空格空格空格….

阅读全文
0 0
原创粉丝点击