[Uml-devel] Re: Umbrello 1.1RC1 compilation problem

Jonathan Riddell jr at jriddell.org
Thu Nov 21 06:36:02 UTC 2002


> I was trying to compile Umbrello 1.1 RC1, and came across the following
> error:
>
> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.1/include
> -I/usr/qt/3/include -I/usr/X11R6/include   -DQT_THREAD_SUPPORT
> -D_REENTRANT  -O2 -fno-exceptions -fno-check-new  -c -o tokenizer.o
> `test -f tokenizer.cc || echo './'`tokenizer.cc
> tokenizer.cc: In member function `virtual int yyFlexLexer::yylex()':
> tokenizer.cc:1525: `yywrap' undeclared (first use this function)
> tokenizer.cc:1525: (Each undeclared identifier is reported only once for
> each function it appears in.)
>
> Not being able to find anything on yywrap, I modified tokenizer.cc to
> contain the following lines:
> #ifndef yywrap
> int yywrap () { return 1; }
> #endif
>
> at the top of the file and it compiled fine after that.
>
> I know this isn't the perfect solution, so maybe you can tell me what
> "yywrap" is and what I need to install to compile this program successfully?

I don't have much idea on our flex stuff, it's nasty and very problematic
and should be removed toot sweet.

Looking at my tokenizer.cc I can see

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap YY_PROTO(( void ));
#else
extern int yywrap YY_PROTO(( void ));
#endif
#endif

but I'm not quite sure what that does.

What distribution and version of GCC and flex are you using?

Works for me on Debian woody, GCC 2.95.4 and flex 2.5.4

Jonathan Riddell






More information about the umbrello-devel mailing list