[antlr-interest] Compiling C runtime & linking

Yves Weißig weissig at rbg.informatik.tu-darmstadt.de
Mon Oct 24 03:34:49 PDT 2011


Hi list,
I successfully compiled the C runtime for ANTLR with VS 2010.
Now I want to compile the generated code (Lexer and Parser) with this
command:
g++ -Iantlrinclude -static -L. -lantlr3c RtfLexer.c RtfParser.c
as you may notice, antlr.h and all includefiles are in antlrinclude and
the antlr3c.lib (copied from the Release dir of VS solution) lies in the
current working dir. I would like to include the runtime statically
("-static").
But it throws:
C:\Users\Yves\AppData\Local\Temp/ccctgQP2.o:RtfLexer.c:(.text+0xb9):
undefined reference to `antlr3LexerNewStream'
which makes me believe the library is not correctly linked... what is
wrong here?
Best regards, Yves


More information about the antlr-interest mailing list