[antlr-interest] C runtime linking error?

Yves Weißig weissig at rbg.informatik.tu-darmstadt.de
Thu Mar 15 02:19:14 PDT 2012


Hi list,

I'm trying to compile and link an ANTLR C backend with some C++ code
which I wrote. This used to work, but now the following command:

g++ -o X -Iusr/local/include -lantlr3c *.cpp

throws a lot of errors:

/tmp/ccnHhg86.o: In function `RtfLexerNewSSD':
RtfLexer.cpp:(.text+0xb0): undefined reference to `antlr3LexerNewStream'
/tmp/ccvF9JS1.o: In function `RtfParserNewSSD':
RtfParser.cpp:(.text+0x7d): undefined reference to `antlr3ParserNewStream'
RtfParser.cpp:(.text+0xfa): undefined reference to `ANTLR3_TREE_ADAPTORNew'
RtfParser.cpp:(.text+0x10e): undefined reference to `antlr3VectorFactoryNew'
/tmp/ccvF9JS1.o: In function `plaintext(RtfParser_Ctx_struct*)':
RtfParser.cpp:(.text+0x8c4): undefined reference to
`antlr3RewriteRuleTOKENStreamNewAE'
RtfParser.cpp:(.text+0x992): undefined reference to
`antlr3RewriteRuleTOKENStreamNewAE'
RtfParser.cpp:(.text+0xa60): undefined reference to
`antlr3RewriteRuleTOKENStreamNewAE'
RtfParser.cpp:(.text+0xb2e): undefined reference to
`antlr3RewriteRuleTOKENStreamNewAE'
RtfParser.cpp:(.text+0xbfc): undefined reference to
`antlr3RewriteRuleTOKENStreamNewAE'
[...] much more are displayed here.

Is there any obvious error that I make?

Best regards
Yves


More information about the antlr-interest mailing list