vpath:make:*** No rule to make target `file1.h',needed by `main.o'.Stop.can you tell why?makefile:VPATH = %.h ./includeVPATH = %.c ./libCFLAGS = -I ./includemain :main.o print1.o print2.o\x05gcc $(CFLAGS) -o main main.o print1.o print2.omain.o :main.
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 20:14:21
vpath:make:*** No rule to make target `file1.h',needed by `main.o'.Stop.can you tell why?makefile:VPATH = %.h ./includeVPATH = %.c ./libCFLAGS = -I ./includemain :main.o print1.o print2.o\x05gcc $(CFLAGS) -o main main.o print1.o print2.omain.o :main.
vpath:make:*** No rule to make target `file1.h',needed by `main.o'.Stop.can you tell why?
makefile:
VPATH = %.h ./include
VPATH = %.c ./lib
CFLAGS = -I ./include
main :main.o print1.o print2.o
\x05gcc $(CFLAGS) -o main main.o print1.o print2.o
main.o :main.c file1.h file2.h
\x05gcc $(CFLAGS) -c main.c
print1.o :print1.c file1.h
\x05gcc $(CFLAGS) -c print1.c
print2.o :print2.c file2.h
\x05gcc $(CFLAGS) -c print2.c
clean :
\x05rm main main.o print1.o print2.o
the files of lib and include locate to /mylib/c/vpath?/(lib and include)
vpath:make:*** No rule to make target `file1.h',needed by `main.o'.Stop.can you tell why?makefile:VPATH = %.h ./includeVPATH = %.c ./libCFLAGS = -I ./includemain :main.o print1.o print2.o\x05gcc $(CFLAGS) -o main main.o print1.o print2.omain.o :main.
这句话的意思好像是,没有所需要的main.o的目标文件.
在WINAVR+AVR Studi里面 这个跟路径的层数以及是否为中文名字有关系.
早上我在遇到过这个问题,把路径的层数少点,如D:\AVR GCC\test
我的问题就解决了,具体是为什么,我也不大清楚,希望可以帮到你.