当我想使用 make 时遇到问题,其中包含链接到我的文件夹的变量。
像这样:
DIR_ST = I\ \:\ The\ Scared\ Stones
SRC_ST = $(DIR_ST)/main.c
OBJ_ST = $(SRC_ST:.c=.o)
但是当我想这样编译时:
all : $(ST)
$(ST) : $(OBJ_ST)
$(CC) $(OBJ_ST) -o strategic
我收到此错误:
make: *** No rule to make target `I \: The Sacred Stones/main.o', needed by `binaries/strategic'. Stop.
如何在 Makefile 中使用此文件夹的名称?
最佳答案
您可以在当前目录中放置一个指向“I:\The Scared Stones”目录的符号链接(symbolic link)
建议使用不含任何空格的链接名称
关于c - 如何在 Makefile 中使用带有 ':' 的变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30277563/