[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
flex-2.5.23 & C++: symbols multiply defined
From: |
Jason Elbaum |
Subject: |
flex-2.5.23 & C++: symbols multiply defined |
Date: |
Mon, 18 Nov 2002 11:06:24 +0200 |
I've just installed flex-2.5.23 for use generating C++ scanners with
g++-3.2, and I've come across the following problem.
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?
Thanks,
Jason Elbaum
address@hidden