Linux <命令行>:1:1: 错误:宏名称必须是标识符
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10779872/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
<command line>:1:1: error: macro names must be identifiers
提问by Tinyspark
I am new to Linux and makefiles. I have a makefile which generates .a files. When I run the makefile, I get the following error. I have no idea from which part of the code, the error occurs.
我是 Linux 和 makefile 的新手。我有一个生成 .a 文件的 makefile。当我运行 makefile 时,出现以下错误。我不知道从代码的哪一部分发生错误。
[oracle@dyl02703app004 erm]# make -f erm_make_ida all
.... Compiling /home/wholesale/children/dev5/comps/erm/obj/ermparseyac.c
cc -g -DANSI -D -DTRACE_ON -DIDA_VERSION='"ISP-RG-V5.10.7GEN2A"' -DNO_MCP -DBUILDING_ERP -I/home/wholesale/children/dev5/comps/erm/include -I/home/wholesale/children/dev5/comps/erm/src -I/home/wholesale/children/dev5/comps/erm/module_test -I/home/wholesale/children/dev5/comps/erm/include -I/home/wholesale/children/dev5/comps/cfm/include -c /home/wholesale/children/dev5/comps/erm/src/ermparseyac.c -o /home/wholesale/children/dev5/comps/erm/obj/ermparseyac.o
<command line>:1:1: error: macro names must be identifiers
make: *** [/home/wholesale/children/dev5/comps/erm/obj/ermparseyac.o] Error 1
Any suggestions...?
有什么建议...?
采纳答案by Ignacio Vazquez-Abrams
You have a -D
flag with no name. Look in your makefile to see what is causing it.
你有-D
一面没有名字的旗帜。查看您的 makefile 以查看导致它的原因。