views:

1095

answers:

2

I'm trying to compile a project on windows and it uses flex/bison.

Compiling the flex and bison files went fine after I installed MinGW, but when I get to the final step of the build of:

g++ -o hexciting CommandParser.tab.o CommandParser.yy.o Command.o -lfl

It says the library can't be found.

After some time on google, I tried changing the flag to -llibfl.a, but this library was also unable to be found.

How can I either get a copy of this library or build one myself?

+3  A: 

Have you tried http://gnuwin32.sourceforge.net/packages/flex.htm ?

eduffy
Turns out the flex I was using wasn't from mingw, but from my AVR toolchain. *doh*
samoz
A: 

I use flex via cygwin, and then compile in Visual Studio, to avoid having to link the library "l", you just need to define

int yywrap()

This function is called when the current file is finished, if yywrap return 0 a new file has been loaded, 1 when no more files exist.

For another one of your questions I hard code yywrap to return 1, as it is taking input from standard-in verse files.

Simeon Pilgrim