Flex, or Bison, generates headers which unconditionally #include <unistd.h>. This file does not exist on windows, so it fails compilation, since it cannot include it.
Is there any clean solution to this problem?
You need to download the flex/bison for windows. The Visual C++ 2005 project is setup to automatically regenerate the parser files using flex/bison (make sure you clean the solution first).
I have GnuWin32 installed, and it still generates the same header file.
There is no unistd.h as far as I am aware on windows, so it fails. Does/should the win32 version of bison generate a different header file that does not try to include unistd.h?
My guess is that gnuwin32 flex / bison generates code that is intended to be compiled with gnuwin32 gcc sor similar. That possibly comes with a unistd header?
Perhaps there's a different version of flex / bison that you should use.
Okan, which version is it that you use for the MSVC stuff?
You can try http://www.monmouth.com/~wstreett/lex-yacc/lex-yacc.html
You can also just create an empty unistd.h.
I'm afraid I can't locate which version of flex/bison I use for the windows distribution. There seems to be so many...
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.