When having multiple quex 0.65.2 lexers built with their own static libaries quexHtml.lib and quexCss.lib, I get redifinition exceptions when linking both static libraries into a LexerTests unit test executable. We already use -o to define our own namespaces, its the Quex internal classes that are being redifined. Do we need to define QUEX_NAMESPACE_QUEX=quexHtml in the HTML lib?
"$(QUEX_PATH)quex.bat" -o html::Lexer -i definitions.qx html.qx --token-id-prefix HTML_TKN_ --token-policy single --suppress 6 -b 4 --icu
"$(QUEX_PATH)quex.bat" -o css::Lexer -i definitions.qx css.qx --token-id-prefix CSS_TKN_ --token-policy single --suppress 6 -b 4 --icu
Error example:
HTML_Lexer.lib(html_Lexer.obj) : error LNK2005: "enum QUEX_TYPE_BOM cdecl quex::bom_snap(struct _iobuf *)" (?bom_snap@quex@@YA?AW4QUEX_TYPE_BOM@@PEAU_iobuf@@@Z) already defined in LexerTests.obj
Please provide an example or advice on how to fix these issues.
Could you provide a minimalist example?
For the time being, replacing extern with QUEX_INLINE should do, I guess.