当我为 EXTRAINCDIRS 提供不带空格的路径(在 Makefile 中,遵循 WINAVR 提供的示例)时,编译器能够找到我的头文件,但是当我使用包含空格的路径时(用引号括起来,如注释Makefile 直接),它引发:error: No such file or directory
.
"d:/dev/avr/atmega/shared/" # will search files in this dir
"d:/dev/avr/atmega/sha ed/" # will not search this dir for files
我的意思是,评论说:
# List any extra directories to look for include files here.
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
知道如何让 WINAVR 正确处理这个问题吗?
我在 Windows XP 上使用程序员记事本 (WINAVR)。这是命令行命令:
avr-g++ -c -mmcu=atmega328p -I. -gdwarf-2 -DF_CPU=UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst -I"d:/dev/avr/atmega/shared/" -I"d:/dev/avr/atmega/sha -Ied/" -std=gnu99 -MMD -MP -MF .dep/main.o.d main.c -o main.o