[antlr-interest] Compiling C runtime & linking

Jim Idle jimi at temporal-wave.com
Mon Oct 24 08:12:33 PDT 2011


You need to send the output of the library build and your session. Here
you say you are building with VS2010 and trying to compile with GNU C++,
which makes no sense. What operating system? What compiler? Which version
of ANTLR?

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Yves Weißig
> Sent: Monday, October 24, 2011 3:35 AM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Compiling C runtime & linking
>
> 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
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address


More information about the antlr-interest mailing list