help-bison
[Top][All Lists]
Advanced

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

Flex and bison generated code files compiling


From: Fred / Geek
Subject: Flex and bison generated code files compiling
Date: Tue, 2 Jul 2002 14:29:10 +0200

I wrote two files : .l and .y, and then gave them to flex and bison, which generated all the files necessary...
the lex.yy.cc is included from the yacc file, and the defines file created by bison is included in the lex file....
Anyway, when finally compiling using this command :
cc -x c++ -o parsertest grammar.cpp

i get those errors and i can't figure out why :
/usr/bin/ld: Undefined symbols:
_main
___ls__7ostreamPCc
___ls__7ostreamc
_bad__C3ios
_cerr
_cin
_cout
_eof__C3ios
_fail__C3ios
_gcount__7istream
_read__7istreamPci
_write__7ostreamPCci
_yylex__Fv

I tried compiling providing cc with the -ly and -ll options, thus the symbol _main was defined, but _yyparse and _yylex appeared in the list of undefined symbols..
I am using MacOS X with Bison 1.28...

Anybody could help ? Thanks !
-- 

reply via email to

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