当前位置: 技术问答>linux和unix
Make问题紧急求助!!!
来源: 互联网 发布时间:2015-08-28
本文导语: 我在FreeBSD下用make出现下列提示,请问如何解决: $ make "/usr/home/xxb/myprog/msg4/Makefile", line 9: Need an operator "/usr/home/xxb/myprog/msg4/Makefile", line 11: Need an operator "/usr/home/xxb/myprog/msg4/Makefile", line 14: Need an operator "/us...
我在FreeBSD下用make出现下列提示,请问如何解决:
$ make
"/usr/home/xxb/myprog/msg4/Makefile", line 9: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 11: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 14: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 16: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 18: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 20: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 23: Need an operator
make: fatal errors encountered -- cannot continue
$
$ make
"/usr/home/xxb/myprog/msg4/Makefile", line 9: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 11: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 14: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 16: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 18: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 20: Need an operator
"/usr/home/xxb/myprog/msg4/Makefile", line 23: Need an operator
make: fatal errors encountered -- cannot continue
$
|
在出错的行,你少了一个tab键,建议首先看看makefile如何编写的文章
欢迎访问我的个人网站 www.linuxc.net
欢迎访问我的个人网站 www.linuxc.net
|
# Makefile
# To build for "msgsrv.c" and "msgsend.c"
# The executable files are "msgsrv" and "msgsend"
all: msgsrv
msgsrv : msgsrv.o wrapfunc.o errlog.o
gcc msgsrv.o wrapfunc.o errlog.o -o msgsrv
msgsend : msgsend.o wrapfunc.o errlog.o
gcc msgsend.o wrapfunc.o errlog.o -o msgsend
msgsrv.o : msgsrv.c ourh.h
gcc -c msgsrv.c -o msgsrv.o
msgsend.o : msgsend.c ourh.h
gcc -c msgsend.c -o msgsend.o
wrapfunc.o : wrapfunc.c ourh.h
gcc -c wrapfunc.c -o wrapfunc.o
errlog.o : errlog.c ourh.h
gcc -c errlog.c -o errlog.o
clean :
rm -f *.o
# end Makefile
# To build for "msgsrv.c" and "msgsend.c"
# The executable files are "msgsrv" and "msgsend"
all: msgsrv
msgsrv : msgsrv.o wrapfunc.o errlog.o
gcc msgsrv.o wrapfunc.o errlog.o -o msgsrv
msgsend : msgsend.o wrapfunc.o errlog.o
gcc msgsend.o wrapfunc.o errlog.o -o msgsend
msgsrv.o : msgsrv.c ourh.h
gcc -c msgsrv.c -o msgsrv.o
msgsend.o : msgsend.c ourh.h
gcc -c msgsend.c -o msgsend.o
wrapfunc.o : wrapfunc.c ourh.h
gcc -c wrapfunc.c -o wrapfunc.o
errlog.o : errlog.c ourh.h
gcc -c errlog.c -o errlog.o
clean :
rm -f *.o
# end Makefile
|
报错的是这个makefile吗?能指一下行号吗?
|
同意hoyt!少tab键
|
嗯,没有行开头的tab。
|
all
|
all :clean msgsrv
msgsrv : msgsrv.o wrapfunc.o errlog.o
gcc msgsrv.o wrapfunc.o errlog.o -o msgsrv
msgsend : msgsend.o wrapfunc.o errlog.o
gcc msgsend.o wrapfunc.o errlog.o -o msgsend
msgsrv.o : msgsrv.c ourh.h
gcc -c msgsrv.c -o msgsrv.o
msgsend.o : msgsend.c ourh.h
gcc -c msgsend.c -o msgsend.o
wrapfunc.o : wrapfunc.c ourh.h
gcc -c wrapfunc.c -o wrapfunc.o
errlog.o : errlog.c ourh.h
gcc -c errlog.c -o errlog.o
clean :
rm -f *.o
msgsrv : msgsrv.o wrapfunc.o errlog.o
gcc msgsrv.o wrapfunc.o errlog.o -o msgsrv
msgsend : msgsend.o wrapfunc.o errlog.o
gcc msgsend.o wrapfunc.o errlog.o -o msgsend
msgsrv.o : msgsrv.c ourh.h
gcc -c msgsrv.c -o msgsrv.o
msgsend.o : msgsend.c ourh.h
gcc -c msgsend.c -o msgsend.o
wrapfunc.o : wrapfunc.c ourh.h
gcc -c wrapfunc.c -o wrapfunc.o
errlog.o : errlog.c ourh.h
gcc -c errlog.c -o errlog.o
clean :
rm -f *.o
|
没有tab