[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flex+bison and C++, second part
From: |
JPerez45 |
Subject: |
Re: flex+bison and C++, second part |
Date: |
Mon, 9 Apr 2007 09:56:21 -0700 (PDT) |
Got link problem (i suppose)
so the general way to compile a lex & yacc program is:
1. Generate the lexer
lex my_file.l
2. Generate the parser
yacc -d my_file.y
3. Compile the sources
cc -c lex.yy.c y.tab.cc
4. Link the object files (this is what i think your problem is)
cc -o my_application lex.yy.o y.tab.ob -ll
If you're using flex change the link library like this:
cc -o my_application lex.yy.o y.tab.ob -lfl
5. Eat cake
it depends on which platform you are developing.
--
View this message in context:
http://www.nabble.com/flex%2Bbison-and-C%2B%2B%2C-second-part-tf1959860.html#a9905584
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.
- Re: flex+bison and C++, second part,
JPerez45 <=