[antlr-interest] Unresolved externals building C executable

Artemus Ward coddbotherer at googlemail.com
Fri Jul 11 00:56:54 PDT 2008


I spent much of yesterday afternoon teasing out the C examples;
hassling with MS Visual Studio registration; building the ANTLR
libraries for my target machine, and just generally rediscovering why
I had started out using Java for this project--but I digress.

I'm getting a load of missing externals when I try to link my little
"hello antlr" program:

Microsoft (R) Incremental Linker Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:GrantLexer.exe
/NODEFAULTLIB:MSVCRT
/LTCG
GrantLexer.obj
GrantParser.obj
Test.obj
C:\antlr-3.0.1\runtime\C\Release\antlr3c.lib
   Creating library GrantLexer.lib and object GrantLexer.exp
Test.obj : error LNK2001: unresolved external symbol _ANTLR3_FPRINTF
antlr3c.lib(antlr3lexer.obj) : error LNK2001: unresolved external
symbol __imp__fprintf
antlr3c.lib(antlr3filestream.obj) : error LNK2001: unresolved external
symbol __imp__fopen
antlr3c.lib(antlr3filestream.obj) : error LNK2001: unresolved external
symbol __imp__fread
antlr3c.lib(antlr3filestream.obj) : error LNK2001: unresolved external
symbol __imp___stat64i32
antlr3c.lib(antlr3inputstream.obj) : error LNK2001: unresolved
external symbol __imp__toupper
antlr3c.lib(antlr3exception.obj) : error LNK2001: unresolved external
symbol __imp__printf
antlr3c.lib(antlr3string.obj) : error LNK2001: unresolved external
symbol __imp__sprintf
GrantLexer.exe : fatal error LNK1120: 8 unresolved externals

Where should I be looking?

Art


More information about the antlr-interest mailing list