How to use Flex on Windows

I apologize if this is a stupid question, but I have 0 experience with this tool and I would like to know if I will use it correctly. I downloaded flex, which, when compiling my lex file, creates a C file, which then needs to be compiled separately. Is this the best way to do this?

+5
source share
2 answers

You can set up a Visual Studio project that uses flexas a custom build step to automatically invoke flexand then compile the generated file. I taught a compilers course last summer, and we have instructions on how to get a flexsample project file , available on the archive course website. You should look at the ad labeled "Visual Studio Starter Files for PP1."

Hope this helps!

+3
source

Using Win flex-bison with visual studio is pretty simple and straightforward. You can find it on Win Flex-Bison .

+1
source

All Articles