我一直收到错误: make:*** [first]错误1
我用它来制作我的makefile。
<service-activator>
它是一种通用形式,可以用于我们的作业。但是,我无法让它执行。
我不知道是否
COMPILER = gcc
CCFLAGS = -Wall -ansi -pedantic
all: first
first: first.o
$(COMPILER) $(CCFLAGS) -o first
first.o:
first.o: first.c first.h
$(COMPILER) $(CCFLAGS) -c first.c
clean:
rm -f first first.o
是问题的一部分。
答案 0 :(得分:1)
问题在于:
$(COMPILER) $(CCFLAGS) -o first
这将扩展为类似gcc -Wall -ansi -pedantic -o first
的内容。请注意,没有指定输入文件,正如错误消息所示。您需要在最后添加first.o
。