help-gnu-utils
[Top][All Lists]
Advanced

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

compiling c-output from Bison


From: Gil Cunningham
Subject: compiling c-output from Bison
Date: Tue, 13 Nov 2001 17:33:04 -0500

Hello-
I am using bash under Windows 2000. I was able to compile flex c-output in
the following manner:
>gcc -o <outname> lex.yy.c -lfl (if you cant read that last piece its LFL ->
lowercase)
Now I have bison generated c code and I have tried compiling like this:
>gcc -o <outname> y.tab.c lex.yy.c -lfl -ly  ("-ly" is for yacc, but I
thought I try it)
I get the following error:
/cygnus/CYGWIN~1/H-I586~1/i586-cygwin32/bin/ld: cannot open -ly: No such
file or directory
collect2: ld returned 1 exit status

When I remove that linker I get:
>gcc -o <outname> y.tab.c lex.yy.c -lfl -ly  
C:\DOCUME~1\GCUNNI~1\LOCALS~1\Temp\cczdtIuX.o(.text+0x2c4):y.tab.c:
undefined reference to `yyerror'
C:\DOCUME~1\GCUNNI~1\LOCALS~1\Temp\cczdtIuX.o(.text+0x9a2):y.tab.c:
undefined reference to `yyerror'
collect2: ld returned 1 exit status

I have also tried inserting a "b" for "bison" between the ly like I did for
flex, but that was no good.
If you could provide some help that would be great.

Thanks

Gil Cunningham
Syncra Systems, Inc.
716 Main St.
Waltham, MA 02541
1-800-808-8894
(781) 693-1284




reply via email to

[Prev in Thread] Current Thread [Next in Thread]