Search Postgresql Archives

Re: [Beginner question]How to solve multiple definition of `yylval'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wen Yi <chuxuec@xxxxxxxxxxx> writes:
> When I use the yacc & lex to compile,

> yacc -d 1-3.y
> lex 1-3.l
> gcc 1-3.tab.c lex.yy.c
> /usr/bin/ld: /tmp/ccYqqE5N.o:(.bss+0x28): multiple definition of `yylval'; /tmp/ccdJ12gy.o:(.bss+0x4): first defined here

Bison provides the declaration of yylval; don't add one yourself.

BTW, this isn't right:

#define YYSTPYE string

first because you misspelled YYSTYPE, and second because you
evidently want yylval to be double not a string.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux