问题:multiple definition of `yylloc'

/usr/bin/ld:scripts/dtc/dtc-parser.tab.o:(.bss+0x50):multiple definition of `yylloc';
scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:127: scripts/dtc/dtc] Error 1
make[1]: *** [scripts/Makefile.build:455: scripts/dtc] Error 2
make: *** [Makefile:529: scripts] Error 2

解决方法:scripts/dtc/dtc-lexer-lex.c文件里找YYLTYPE yyllocc,修改为 extern YYLTYPE yylloc.

posted @ 2024-05-08 18:03  liudelantu  阅读(790)  评论(0)    收藏  举报