I'm taking a class on Flex/Bison at University this semester, and I'm having serious issues trying to get Flex working. (Possibly due to my own inaptitude, but I'm finding a solution very, very difficult to research)
I am trying to use the Command Prompt to navigate to a file containing a .l (Lex) file and then use Flex to generate a .yy file flex -ooutputfile.yy.c inputfile.l
I downloaded the windows version of Flex from http://gnuwin32.sourceforge.net/packages/flex.htm
I checked to make sure I had the appropriate .dlls (as mentioned in the installation instructions here http://gnuwin32.sourceforge.net/install.html)
I downloaded Visual Studio 2008 via Dreamspark and installed it (from which point on I used Visual Studio 2008 Command Prompt)
I installed Cygwin at someone's suggestion
I installed Perl after noticing the Requirements (as mentioned here http://gnuwin32.sourceforge.net/install.html) list 'perl, etc.'
After each and every attempt at a solution I continue to receive the message 'flex' is not recognized as an internal or external command, operable program or batch file.
I've spent several hours searching however I am at a loss. I've been unable to find any comprehensive instructions on how to install Flex or on it's requirements / dependencies... Any help would be much appreciated!
The error you are getting means that flex.exe
isn't in your PATH
environment variable. You need to figure out where the installer installed flex
and add that to your PATH
or manually install it somewhere in your PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With