编写Make file时,编译报错:
main.c:(.text+0xee):对‘pop’未定义的引用
collect2: error: ld returned 1 exit status
main:main.o linkedlist.o
gcc -o main main.o linkedlist.o
main.o:main.c linkedlist.h
gcc main.c
linkedlist.o:linkedlist.c
gcc linkedlist.c
clean:
-rm main *.o
.PHONY:clean
但是单独敲命令编译就能成功
gcc -o main main.c linkedlist.c
是Makefile哪一步出错了吗?