Linux运行makefile时出现makefile:2: *** 遗漏分隔符 (您的意思是用 TAB 代替 8 个空格?)。 停止。解决方法。
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash

·
你的文件用要用tab键的地方你用了空格。导致了这个错误出现,解决方法。
你的文件是:
编写makefile文件
示例:
①hello:hello.o
② gcc –o hello hello.o
hello.o:hello.c
③ gcc –c hello.c –o hello.o
④clean:
⑤ rm –f *.o
你要做的修改是把你2,3,5行的空格去掉,然后点击tab键即可。(序号不要复制,只是为了方便讲解)。下面是代码。在2,3,5行用tab键。
hello:hello.o
gcc –o hello hello.o
hello.o:hello.c
gcc –c hello.c –o hello.o
clean:
rm –f *.o
最后,摁Esc,:wq!回车。问题就解决了。




A beautiful web dashboard for Linux
最近提交(Master分支:6 个月前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
所有评论(0)