[antlr-interest] Unresolved externals building C executable
Gavin Lambert
antlr at mirality.co.nz
Fri Jul 11 01:58:00 PDT 2008
At 19:56 11/07/2008, Artemus Ward wrote:
>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:
[...]
>/NODEFAULTLIB:MSVCRT
[...]
>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
Well, it looks like you've compiled the ANTLR library with
settings expecting the CRT to be loaded as a DLL, and then refused
to link your application against the CRT import library.
More information about the antlr-interest
mailing list