Undefined reference to yyparse (flex & bison)

与世无争的帅哥 提交于 2019-12-03 03:38:22

Solved it, the command

cc -o $@ fb3-1.tab.c fb3-1.lex.c fb3-1funcs.c

Should be

cc -o fb3 fb3-1.tab.c fb3-1.lex.c fb3-1funcs.c

Not sure why the book didn't specify that for the example.

I read that chapter as well and I believe the author is indicating that the code should be put in a "Makefile" to automate the build process for said files.

The $@ is a variable expansion used in bash shell scripts (among other places) and probably does the same thing in make or is exactly the same thing that make is implementing.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!