Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compiler Tools Pccts > gcc Lex and Yac...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 117 of 134
Post > Topic >>

gcc Lex and Yacc Problem

by bill.meehan@[EMAIL PROTECTED] May 31, 2006 at 02:47 PM

I am trying to write a parse program/script/whatever using lex and
yacc.

basically, I'm getting this error:
***********************************************************************(Compiling
commands)
[me]$ bison -d tcpparse.y
[me]$ mv tcpparse.tab.h tcpparse.h
mv: overwrite `tcpparse.h'? y
[me]$ mv tcpparse.tab.c tcpparse.y.c
mv: overwrite `tcpparse.y.c'? y
[me]$ flex tcpparse.l
[me]$ mv lex.yy.c tcpparse.lex.c
mv: overwrite `tcpparse.lex.c'? y
[me]$ gcc -c tcpparse.lex.c -o tcpparse.lex.o
[me]$ gcc -c tcpparse.lex.c -o tcpparse.lex.o

***********************************************************************error
begins here*****************
[me]$ gcc -o tcpparse.lex.o tcpparse.y.o -ll -lm -lfl
tcpparse.y.o(.text+0x25e): In function `yyparse':
: undefined reference to `yylex'
collect2: ld returned 1 exit status
************************************************************************error
ends here******************


Now, my understanding of Lex and Yacc is not very good. If you could
help me with a solution that would be great. If you could write it so
your kids could understand it, that would be better.

I'm just looking for some possible causes of this problem. and maybe a
hint at what I need to look for.


Bill Meehan
 




 1 Posts in Topic:
gcc Lex and Yacc Problem
bill.meehan@[EMAIL PROTEC  2006-05-31 14:47:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 20:08:03 CDT 2008.