Hello :)
I'm trying to use Flex with Visual C++. However, the generated lexer (which is empty and has no rules) throws these errors while building:
configurationlexer.cpp(967): error C3861: 'read' identifier not found
configurationlexer.cpp(967): fatal error C1903: unable to recover from previous error(s); stopping compilation
The source file is:
%{
#include <string>
%}
%option yylineno
%%
%%
//Lexer End
I'm building by adding this target to my Visual Studio project:
<Target Name="Flex" Inputs="$(MSBuildProjectDirectory)\ConfigurationLexer.l" Outputs="$(MSBuildProjectDirectory)\ConfigurationLexer.cpp;$(MSBuildProjectDirectory)\ConfigurationLexer.hpp">
<Exec Command="C:\Cygwin\bin\flex.exe --nounistd -f -o "$(MSBuildProjectDirectory)\ConfigurationLexer.cpp" "--header=$(MSBuildProjectDirectory)\ConfigurationLexer.hpp" "$(MSBuildProjectDirectory)\ConfigurationLexer.l"" />
</Target>
Is it possible to use Flex with MSVC?
EDIT: Made CW because I answered it myself and I'm not trying to be a rep whore.