Eran Kampf
Eran Kampf
1 min read

Compiling flex for win32 using VS.NET 2003

I’ve recently had to use flex and went through some trouble trying to compile it to win32 platform (using my VS.NET 2003).

So, if you want to compile here’s what you do:

  1. Get the latest flex distribution. You can find instructions on flex’s homepage.
  2. Extract the distribution package to some folder (ex: d:\flex).
  3. Download the VS.NET solution I have created – (25.74 KB)
  4. Unzip to the flex misc folder (ex: d:\flex\MISC).
  5. A new VS.NET folder is created under the MISC folder. Open the solution in that folder and build it.
  6. The build process creates a new ‘bin’ folder under the ‘’ folder where flex.exe and flexlib.lib are located.

I have also included a test project which shows how to use flex with visual studio. This samples compiles a lex file and builds a console application.

If you just want the flex.exe without bothering with compiling it I have packed it here: (73.11 KB)