显示*** missing separator (did you mean TAB instead of 8 spaces?) 解决方案
2014-11-24 21:43
603 查看
很高兴的,开始编写makefile,可是一make ,就指着第六行,说错误:makefile:6: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
于是,就检查动作行没行之前都8个空格,可是还是不行。搜吧,有人说要在gcc前面加tab键,就第二行各个文件之间都加了tab键,不行。最终找到一个网页上标准的语法说明:
makefile应该是:
program:make.o
<TAB>gcc make.o -o make
make.o:make.c
<TAB>gcc -c make.c
原来要在每个动作行之前必须加一个<tab>,如下所示:
CC = gcc
CFLAGS = -fpic -c
.PHONY : clean gprs
gprs : stty.o driver.o parse.o tcp.o
$(CC) -o tcp.so -shared stty.o driver.o parse.o tcp.o -I/usr/include/python2.6/ -Ipython2.6
stty.o : stty.c stty.h
$(CC) $(CFLAGS) s tty.c
driver.o : driver.c driver.h
$(CC) $(CFLAGS) driver.c
parse.o : parse.c parse.h
$(CC) $(CFLAGS) parse.c
tcp.o : tcp.c tcp.h
$(CC) $(CFLAGS) tcp.c
clean :
rm -f stty.o driver.o parse.o tcp.o tcp.so
搞定!
于是,就检查动作行没行之前都8个空格,可是还是不行。搜吧,有人说要在gcc前面加tab键,就第二行各个文件之间都加了tab键,不行。最终找到一个网页上标准的语法说明:
makefile应该是:
program:make.o
<TAB>gcc make.o -o make
make.o:make.c
<TAB>gcc -c make.c
原来要在每个动作行之前必须加一个<tab>,如下所示:
CC = gcc
CFLAGS = -fpic -c
.PHONY : clean gprs
gprs : stty.o driver.o parse.o tcp.o
$(CC) -o tcp.so -shared stty.o driver.o parse.o tcp.o -I/usr/include/python2.6/ -Ipython2.6
stty.o : stty.c stty.h
$(CC) $(CFLAGS) s tty.c
driver.o : driver.c driver.h
$(CC) $(CFLAGS) driver.c
parse.o : parse.c parse.h
$(CC) $(CFLAGS) parse.c
tcp.o : tcp.c tcp.h
$(CC) $(CFLAGS) tcp.c
clean :
rm -f stty.o driver.o parse.o tcp.o tcp.so
搞定!
相关文章推荐
- Makefile:130: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
- makefile报错:Makefile: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
- *** missing separator (did you mean TAB instead of 8 spaces?)或者*** missing separator的解决办法
- make工具报错:missing separator (did you mean TAB instead of 8 spaces?). Stop.
- 解决vim写的Makefile报错:Makefile: missing separator(did you mean TAB instead of 8 spaces?). Stop.
- 导入android sdk samples工程报错"did you mean to use @+id instead of @+android:id?"
- Unknown type name "CGRect",did you mean "Rect"?的解决方案
- Unknown type name 'class'; did you mean 'Class'? 解决方案
- 解决无限 This file is indented with tabs instead of 4 spaces
- iOS开发-63】Unknown type name "CGRect",did you mean "Rect"?的解决方案
- BuildError: Could not build url for endpoint 'show'. Did you mean 'api.show' instead?
- 解决无限 This file is indented with tabs instead of 4 spaces
- eclispe pydev tab改回 空格找到方法了,这个链接:http://stackoverflow.com/questions/23570925/eclipse-indents-new-line-with-tabs-instead-of-spaces
- 解决无限 This file is indented with tabs instead of 4 spaces
- BuildError: Could not build url for endpoint 'main.index'. Did you mean 'main.indexs' instead?
- 解决无限 This file is indented with tabs instead of 4 spaces
- 【iOS开发-63】Unknown type name "CGRect",did you mean "Rect"?的解决方案
- Unknown type name "CGRect",did you mean "Rect"?的解决方案
- IntelliJ IDEA出现:This file is indented with tabs instead of 4 spaces的问题解决
- 如何禁止VS显示“You have mixed tabs and spaces. Fix this?”