[Uml-devel] Problems compiling with flex 2.5.31

Michel Hermier michel.hermier at wanadoo.fr
Sun Apr 27 03:38:05 UTC 2003


On Sunday 27 April 2003 01:42, Jonathan Riddell wrote:
> On Thu, 24 Apr 2003, Albert Chin wrote:
> > Trying to build on Redhat Linux 7.1 with GCC 3.2, KDE 3.1.1, Qt 3.1.2:
> > ...
> > In file included from tokenizer.l:25:
> > /opt/TWWfsw/flex25/include/FlexLexer.h:113: redefinition of `class
> > yyFlexLexer' /opt/TWWfsw/flex25/include/FlexLexer.h:113: previous
> > definition of `class yyFlexLexer'
> > /opt/TWWfsw/flex25/include/FlexLexer.h:113: confused by earlier errors,
> > bailing out gmake[3]: *** [tokenizer.o] Error 1
> > gmake[3]: Leaving directory `/opt/build/umbrello-1.1.1/uml/classparser'
> >
> > I can fix this by adding:
> >   #undef yyFlexLexer
> > after the following in FlexLexer.h:
> >   #define yyFlexLexerOnce
> >
> > Is this just flex being silly?
>
> Interesting (and disappointing).  Flex 2.5.31 is new, can you tell us if
> the same error occurs with Flex 2.5.27?
>

Works well for me with 2.5.27, and get the same problem with 2.5.31.
Removing the #include "FlexLexer.h" at the begining solve the problem, as it 
is now automatically included in the generated c++ file( for automatic lexer 
name prefix I guess ).
Maybe the option nomain is also missing.

Michel




More information about the umbrello-devel mailing list