By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,232 Members | 1,770 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,232 IT Pros & Developers. It's quick & easy.

yacc under cygwin - undefined symbols

P: n/a
Compilation (make, yacc, lex) of little parser used to work fine under
BSD (FreeBSD) and now that I want to build it under cygwin, I suddenly
get

gcc -c y.tab.c
y.y: In function `yyparse':
y.y:17: error: `lfd' undeclared (first use in this function)
y.y:17: error: (Each undeclared identifier is reported only once

lfd is a static variable which is defined at the end of the .y file,
instead at the beginning. That is, the yyparse main program is appended
at the end instead at the beginning of the generated y.tab.c.

Strange. How can I influence this?

--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de

Jun 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 25 Jun 2006 11:01:45 GMT, in comp.lang.c , Christoph Kukulies
<ku**@accms33.physik.rwth-aachen.de> wrote:
Compilation (make, yacc, lex) of little parser used to work fine under
BSD (FreeBSD) and now that I want to build it under cygwin, I suddenly
get


lex and yacc are offtopic in CLC,. you probably need to ask in a linux
or unix programming group, or a general programming one.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Jun 25 '06 #2

P: n/a
Christoph Kukulies <ku**@accms33.physik.rwth-aachen.de> writes:
Compilation (make, yacc, lex) of little parser used to work fine under
BSD (FreeBSD) and now that I want to build it under cygwin, I suddenly
get

gcc -c y.tab.c
y.y: In function `yyparse':
y.y:17: error: `lfd' undeclared (first use in this function)
y.y:17: error: (Each undeclared identifier is reported only once

lfd is a static variable which is defined at the end of the .y file,
instead at the beginning. That is, the yyparse main program is appended
at the end instead at the beginning of the generated y.tab.c.

Strange. How can I influence this?


By reading the yacc documentation, Googling, or posting in a more
appropriate newsgroup (perhaps comp.unix.programmer, comp.compilers,
or gnu.utils.help). You don't really have a C question; you have a
yacc question.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jun 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.