Undefined reference to yyparse (flex & bison)

前端 未结 2 1996
执念已碎
执念已碎 2021-02-06 11:37

I\'m attempting to learn some flex/bison, and I\'m reading Flex & Bison by John Levine (O\'Reilly). There is an example that I need to get running, however I can\'t get it

2条回答
  •  天命终不由人
    2021-02-06 12:12

    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.

提交回复
热议问题