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.c file1.h file2.h\x05gcc $(CFLAGS) -c main.cprint1.o :print1.c file1.h\x05gcc $(CFLAGS) -c print1.cprint2.o :print2.c file2.h \x05gcc $(CFLAGS) -c print2.cclean :\x05rm main main.o print1.o print2.othe fil

问题描述:

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)

这句话的意思好像是,没有所需要的main.o的目标文件.
在WINAVR+AVR Studi里面 这个跟路径的层数以及是否为中文名字有关系.
早上我在遇到过这个问题,把路径的层数少点,如D:\AVR GCC\test
我的问题就解决了,具体是为什么,我也不大清楚,希望可以帮到你.