前几天遇到类似的问题[http://bbs.chinaunix.net/thread-1589386-1-1.html]:
在Makefile里面定义一个字符串在程序里面使用,CFLAGS += -DMY_PATH=/etc/mycfgCFLAGS += -DMY_PATH="/etc/mycfg"上面两种写法都不行。
正确的写法如下:
CFLAGS += -DMY_PATH="/etc/mycfg"