3

I can't figure this one out. I can download a win32 binary of flex 2.5.4a from gnuwin32, but I'd like to build the latest version (2.5.35) using Visual Studio 2005. I suppose I could build in in cygwin, but where is the fun in that?

rici
  • 234,347
  • 28
  • 237
  • 341
rev
  • 1,681
  • 2
  • 13
  • 21
  • It might help if you elaborated a little on how far you've made it. – JesperE Oct 22 '08 at 18:24
  • i gave up. i like to build my own tools, but flex can't be built in vs2005 without a lot of modifications. i could build it in cygwin. if someone has found the secret sauce for building flex in vs200x, i'd love to know what it is. – rev Nov 25 '08 at 03:36

4 Answers4

2

Note that Flex is seriously out-of-date on Windows when it comes to generating C++ scanners. Recent Flex versions which are able to generate ISO C++ scanners do not support Win32 (MinGW or VS), so you're probably better of trying to generate a C scanner and call it from C++.

JesperE
  • 63,317
  • 21
  • 138
  • 197
1

You can also download the MINGW (Minimalist GNU for Windows) build of flex 2.5.35 at sourceforge.net. This build may not be entirely self-contained; the release notes suggest that certain components of MSYS (Minimal SYSytem) are required.

JPaget
  • 969
  • 10
  • 13
1

since nobody provided a satisfactory answer to my question, i am posting my final solution here.

i was unable to find a way to build flex in vs 2005 or vs 2008. instead, i am using the flex that is distributed with cygwin, which is pretty recent. in order to save myself the hassle of installing cygwin on every machine that i need to use flex on, i just saved off the dependencies: cygwin1.dll and cygintl-8.dll.

there is only one caveat - cygwin's flex also depends on m4, though you won't see it on the dependency walker. it needs to be in the path, which makes it a pain. you can use cygwin's m4.exe, but it depends on cygwin1.dll also, which will need to be in the path for m4 to execute.

even so, i just check all of those files into my svn under a tools folder and then whenever i need to develop on another machine, get my code and flex with svn, copy m4.exe and cygwin1.dll to the windows\system32 folder, and i'm in business.

rev
  • 1,681
  • 2
  • 13
  • 21
0

Why you don't want to try the Spirit framework from Boost?

Svetlana
  • 1,103
  • 1
  • 14
  • 19