Closed AlexeyAB closed 11 years ago
File lex.yy.c is automatically generated by running flex against a fl.l file so it would have to be changed manually each time ?
Yes, you right. Maybe this will solve the problem, can you use YY_NO_UNISTD_H for fl.l as here? https://github.com/jonathan-beard/simple_wc_example/pull/1/files
And if errors occur, then "If you know that your program will never be used in an interactive kind, you can add %option never-interactive to you lexer": http://stackoverflow.com/questions/2793413/unistd-h-related-difficulty-when-compiling-bison-flex-program-under-vc
I use the old version of flex so adding YY_NO_UNISTD_H doesn't seem to do much, the include file is still there. The new version seems to fix this problem, I will try it later today. For now I just removed the include statement from lex.yy.c
Regards, Anton
Exclude unistd.h for MS C++ Compiler.