Date: Sun, 14 Jan 1996 14:04:26 +0200 (IST) From: Eli Zaretskii To: Peter Plum Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Peter: Help with sample file 'main.c' On Sun, 14 Jan 1996, Peter Plum wrote: > This program was in the Samples directory but doesn't seem to work. I get > the following message. > > > GNU C++ Compile: MAIN.c > MAIN.c(.text+0x4b): undefined reference to `yyparse' Please read the FAQ, section 8.8. It describes all the problems of this kind. For sin(), use -lm. > I also find no reference to 'yyparse' in any of the help files or any c/c++ > book. `yyparse' is a function which parser generators like Yacc and Bison generate given a description of the grammar. You then should link your main program against the C file which those programs produce. > #include "hc.h" From this I guess you are trying to build a calculator program, right? The sources for that program should include a file with a .y extension, which is the description of its input language. Run Yacc or Bison on that file, and you will get a .c file which defines `yyparse'. The DJGPP archives include a port of GNU Bison program in the file bsnNNNbn.zip (where NNN is the version number); please also download bsnNNNdc.zip (the docs), so you know how to use it.