help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: flex-2.5.23 & C++: symbols multiply defined


From: John Millaway
Subject: Re: flex-2.5.23 & C++: symbols multiply defined
Date: Mon, 18 Nov 2002 09:35:19 -0500 (EST)

> I have two flex++ scanners linked into a single executable. They use
> different code prefixes: %option prefix="X" and %option prefix="Y".
> However, it seems the prefix doesn't affect the definitions of
> yyrealloc(), yyfree(), yyalloc() or yylex_destroy(). These functions are
> defined in the C++ files of both scanners. The result, predictably, is
> linker errors: ld: fatal: symbol `yyrealloc(void*, unsigned)' is
> multiply-defined (etc.).
>
> Is there a way to correct this problem, either by applying the code
> prefix to these functions or by moving them into the *FlexLexer class
> generated?

#define YY_NO_FLEX_ALLOC
#define YY_NO_FLEX_REALLOC
#define YY_NO_FLEX_FREE






reply via email to

[Prev in Thread] Current Thread [Next in Thread]