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/09/11 04:57:18
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.
x]OPǿso9`DCb.ۙ1 d lс HaALY-<}$ rMOi8y"&H RR\\EüiP f0XOAVF #wTԓGpn B\L ]eT㳣G&Ydh*˩W/!^~}޼,í~O<CNLr{lJwZ#zv|7赖_99pHn╛Ȳ,s2  !o! d0:V[' 3I:,a^,d:#BO@XHFe]'լu P jrZ]+9XgN黢H;I]V4Z'I(059ӷ-S'2+DL4MV,Ǧ_LLKP$uQfhC'n#4FiK,ֱu,ͳe,oXSNGyZXykk!5h}#*Jәh=>,q.O>

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
我的问题就解决了,具体是为什么,我也不大清楚,希望可以帮到你.