Version: current CVS (using KDE Devel) Installed from: Compiled sources Compiler: gcc 3.3.2 (Debian) OS: Linux Compiling kdesdk/umbrello/umbrello/classparser/libclassparser_la.all_cc.cc gives the following error: In file included from ClassParser.h:31, from ClassParser.cc:20, from libclassparser_la.all_cc.cc:17: /usr/include/FlexLexer.h:112: error: redefinition of `class yyFlexLexer' /usr/include/FlexLexer.h:112: error: previous definition of `class yyFlexLexer' followed by various others. The problem is that the FlexLexer.h header has a strange way of handling multiple inclusions of itself. tokenizer.l (tokenizer.cc) and ClassParser.cc both include this header indirectly, and in separate compilation they work fine; but when compiling concatenated source, a "#define yyFlexLexer yyFlexLexer" declaration (inserted by flex) carries through from tokenizer.cc to ClassParser.cc, and causes havoc on the second inclusion. (In the error message quoted above, the two FlexLexer.h lines are the second and first inclusions, respectively.) The/A solution is to "#undef yyFlexLexer" at the end of tokenizer.l, and I will attach a patch that does this with an explanation why.
Created attachment 3034 [details] Bugfix patch against tokenizer.l This patch appends "#undef yyFlexLexer" to the end of tokenizer.l (and thereby tokenizer.cc). Kills the bug.
*** Bug has been marked as fixed ***.